Forum Moderators: goodroi
Suppose I had a directoy and subdirectory like this:
www.randomwebsite.com/media/
www.randomwebsite.com/media/images/
If I want to block robots from accessing the directory /media/ but I DO want them to index the content in the subdirectory /media/images/ how do I set up the robots.txt file?
I tried
Disallow: /media
and it blocked everything including the /media/images/ subdirectory.
Then I tried
Disallow: /media/
And it still prevented the /media/images/ subdirectory from being indexed. And help would be appreciated. Thanks.
Alternatively, use the server configuration to deny access to the /media directory index. For example, on Apache, you could put
Options -Indexes Jim