One a website entirely mod_rewrited I would like to robots.txt all my PHP files to avoid duplicate content.
I use user-agent: * Disallow: suggest.php
Is it the way to go?
Thanks!
FalseDawn
5:17 pm on Nov 25, 2005 (gmt 0)
What you are suggesting will have no effect. You are just going to have to wait for your site to get re-indexed and the old links dropped. Things get a little more complicated if you have lots of inbound links using the "old" URLs and don't want to lose the PR.
Dijkgraaf
8:40 pm on Nov 25, 2005 (gmt 0)
Well for staters it should be Disallow: /suggest.php It always has to start with a leading /
A better method though might be to put a 301 redirect in place for the pages pointing to the new location, this will mean it will find the new ones faster.
followgreg
2:08 am on Nov 26, 2005 (gmt 0)
So if I understood correctly I just have to add a / to my robots.txt
And this will prevent SE from spidering all my .php?whatever&anything=zoopzoop right? :)
Dijkgraaf
4:24 am on Nov 26, 2005 (gmt 0)
If you were to have Disallow: / Then your whole site will be disallowed, not just the php files.
Some search engines do support wildcards such as Disallow: /*.php but these aren't currently part of the robots.txt standard, and should only be specified for particular user-agent's if it all.