My old search file used to be named namesearch.php. It’s now named search.php. The query string parameters remain the same. I would like to redirect any namesearch request to search.php. Here is what I have below, which is not working.
RewriteRule ^/namesearch.php%1 search.php$1 [R=301,L]
Query strings are automatically appended when the target URI doesn’t try to construct its own (i.e. it doesn’t have a
?in it). You can use either mod_rewrite or mod_alias:mod_alias:
mod_rewrite: