Hi, How do I do a 301 redirect for a URL like http://www.mydomain.com/index.php?rss_id=some%20text Code (markup): to become just http://www.mydomain.com Code (markup): I want to remove some URL from the search engine's list (Bing, in this case). Thanks!
If you want to *remove* it, why not use https://support.discoverbing.com/de...ductkey=bingcontentremoval&brand=&&ct=eformts
I emailed them. It's more than one URL and more than one site, so I'm looking for an .htaccess solution like: RewriteRule ^rss_id([^/\.]+)?$ / [R=301,L] Code (markup): This doesn't seem to work for me. Any ideas?
You may be able to do a RedirectMatch 301 or something.. not too good at regex or anyhting m yself if you have access to the PHP source, you could do if(isset($_GET['rss_id'])){header('HTTP/1.1 301 Moved Permanently');header('Location: /');}
The ^ before rss_id stands for beginning of the path, so it won't match the URLs you are trying to redirect and hence won't work. Try changing it to: RewriteRule ^/index.php?rss_id([^/\.]+)?$ / [R=301,L] Code (markup):
I tried in on another webhost (1&1) and it didn't work. This seems to work, though: RewriteCond %{QUERY_STRING} rss_id=(.*) RewriteRule ^index.php(.*) /? [R=301,L] Code (markup):