htaccess question
Hello. I'm new so I'm sorry if I posted in the wrong place. I wasn't sure where exactly to post.
I have a drupal installation (a php/mysql cms).
I used to have a lot of urls like /node/22 , node/32 etc..
Then I used rewrite rules within drupal to convert those to more friendly urls like
/about instead of /node/22
Then I used robots.txt to block indexing of /node/ and used google webmaster tools to remove /node/22 etc..
But after a few months, those urls reappeared in google search results because it appears google still has the info it crawled in 2009. so i had to remove them again.
To avoid going through this every few months, I was advised to fool googlebot into thinking that /node/* urls are permanently gone by returning 410 error (instead of robots.txt). Googlebot will still crawl mysite.com/about and not mysite.com/node/22.
Someone suggested
RewriteCond %{HTTP_user_agent} Googlebot.*
RewriteCond %{QUERY_STRING} ^/node/(.*)$1
RewriteRule ^$1 - [G]
But it didn't work. Any suggestions?
Last edited by hussam; 05-17-2010 at 02:05 PM.
|