Reputation: 17333
For example, I want to block /foo.php
, /foo/foo.php
and every other similar URL in robots.txt
, only leaving /
, /foo/
, etc. behind.
In other words, I want to block everything except the directories.
How is this possible?
Upvotes: 0
Views: 145
Reputation: 96567
If all URLs you want to block end in (or contain) .php
, you could use
User-agent: *
Disallow: /*.php
However, this uses the *
wildcard, which maybe not all parsers support (Google supports it).
Upvotes: 1