The ?
is not part of a query but used as if it were an actual question. Here's an example:
/how-did-penicillin-change-the-world?.html
What's the best way to redirect that URL to something like /news.html
?
The ?
is not part of a query but used as if it were an actual question. Here's an example:
/how-did-penicillin-change-the-world?.html
What's the best way to redirect that URL to something like /news.html
?
?
is not part of a query" - Well, actually it is. An unencoded?
in the URL delimits the start of the query string (whether that is the intention or not). Once you realise that then the method you use is the same for matching any other URL with a query string. – MrWhite Nov 24 '17 at 15:15