Hi, starting a few days ago, I started to try to remove one folder of one f my websites from google index. As they say on their website the rules are : As I say I'm trying to remove an entire subfolder I did the following thing still now : In .htaccess in root RewriteRule info/name/folder-toremove/ http://www.website.com/pagethatdoesnotexist.html [R=301,L] In robots.txt in root User-agent: Googlebot Disallow: /info/name/folder-toremove But google is still responding to my requests with "Denied" I want to mentions that http://www.website.com/info/name/folder-toremove/ i actually pointing with a .htaccess rule help to another page. Anyway the rule is the last line in my .htaccess file RewriteRule info/(.*)/(.*)/ show_page.php?id_menu=$1&id_categ=$2 Any solutions ?
To able all the rewrite rules ? No, unfortunately I can't do this because my website is based on 99% on Rewrite. If I will remove this rewrite rule: RewriteRule info/name/folder-toremove/ http://www.website.com/pagethatdoesnotexist.html [R=301,L] Then it will be valid this one : RewriteRule info/(.*)/(.*)/ show_page.php?id_menu=$1&id_categ=$2 and this one will return an 200 Code with an error message from my script. Anyway I don't understand why the robots.txt is not working. Any other suggestions ?
You don't need to disable all rules. Try to disable only the redirect rule for that folder and submit the request.
Or maybe someone can help me to write this condition: RewriteRule info/(.*)/(.*)/ show_page.php?id_menu=$1&id_categ=$2 to work like this In case that in the second param this string "folder-toremove" or maybe "folder-toremove2" is found then the rule to not apply
I tryed to remove only that line, but as I say , no success. Because now the second line rule apply the one with 301