I am trying to create a rewrite cond in htaccess I am trying to redirect
http://www.example.com/business/search-results.php?keywords=Animal+Business+Cards&go=Search
to
http://www.example.com/business/search results.php?keywords=Animal+Business&go=Search
or if possible remove the word "+cards" from any search queries...
what I have tried so far
RewriteEngine On
RewriteCond %{QUERY_STRING} ^Animal+Business+Cards$
RewriteRule ^(.*)$ http://www.example.com/business/search-results.php?keywords=Animal+Business [R=301,L]
also tried
RewriteCond %{QUERY_STRING} "&go=Search" [NC]
RewriteRule (.*) /$1? [R=301,L]
and this
Redirect /business/search-results.php?keywords=Animal+Business+cards&go=Search http://www.example.com/business/search-results.php?keywords=Animal+Business&go=Search
None of these working... is it possible? Can any one help? Thank You in advance
+in redirect conditions, it's a special character. Use\+or[+]instead. A+means one or more of the character directly before the symbol must occur. E.g.a+matches "a", "aa", "aaa" ,...RewriteEngine On RewriteCond %{QUERY_STRING} ^Animal[+]Business[+]Cards$ RewriteRule ^(.*)$ http://www.example.com/business/search-results.php?keywords=Animal[+]Business [R=301,L]