I have changed the platform of my site and therefore have a new search url structure.
The old url structure is like this:
/catalogsearch/result/?q=test
and the new url structure is like this:
/search_results.php?keyword=test&submit_search=
I have tried to redirect the old URLs to the new one using this code, but it doesnt appear to be working.
RewriteRule ^(catalogsearch\/result\/\?q=).*$ search_results.php?keyword=$1&submit_search= [L]
Is there something I am missing?
You need to use
RewriteCond %{QUERY_STRING}
to match query string.You can use: