.htaccess - Redirect Bots crawling URLs with parameters to category page -
i need redirect bots crawling urls this:
example.com/en/percussion/drums/?p=1&f=56%7c286%7c55%7c319%7c30%7c36%7c16%7c573%7c311%7c224%7c35%7c322%7c364
they should redirected main category:
example.com/en/percussion/drums/
with 301 redirect in htaccess. rule should bots googlebot or others.
like this:
rewriteengine on rewritecond %{query_string} ^p=1&f=(.*)$ [nc] rewritecond %{http_user_agent} googlebot rewriterule (.*) write here? [l,r=301] i don't know how create correct rewriterule, redirects requested url, without query_strings (example.com/en/percussion/drums/).
any idea?
thanx lot
you need add ? @ end remove query string, try:
rewriteengine on rewritecond %{query_string} ^p=1&f=(.*)$ [nc] rewritecond %{http_user_agent} googlebot rewriterule (.*) /$1? [l,r=301]
Comments
Post a Comment