Reputation: 171
Using htaccess, I want to redirect
index.php?page=search&action=go&string=John+Doe
to
search.php?string=John+Doe
but only if page=search and action=go in the first url (string varies)
Any help appreciated, thank you.
Upvotes: 2
Views: 6091
Reputation: 7476
Use below rule,
RewriteCond %{QUERY_STRING} ^page=search&action=go&string=(.+?)$
RewriteRule ^ /search.php?string=%1 [R=301,L]
Upvotes: 3