Forum Moderators: phranque
I am checking my SERPs on Google and found my site map page is producing some URLs like
[mysite.com...]
which, I think should be 301 redirect to
[mysite.com...]
how do I write a rule for this redirect?
would this code below work?
RewriteCond %{QUERY_STRING} ^(.+)name=[0-9a-z]+&(.+)$ [NC]
RewriteRule (.*) $1?%1&%2 [R=301,L]
and if I need to rewrite this
[mysite.com...]
to
[mysite.com...]
should the code be
RewriteCond %{QUERY_STRING} ^(.+)sams=[0-9a-z]+&(.+)$ [NC]
RewriteRule (.*) $1?%1&%2 [R=301,L]