homepage Welcome to WebmasterWorld Guest from 54.226.213.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Search Engines / Sitemaps, Meta Data, and robots.txt
Forum Library, Charter, Moderators: goodroi

Sitemaps, Meta Data, and robots.txt Forum

    
Robots.txt conundrum!
energylevel




msg:1525245
 2:05 pm on Dec 30, 2004 (gmt 0)

I don't want the contents of a specific directory spidered however there is a subdirectory of this directory whose contents I would like spidering, is it possible to disallow the directory and still allow the subdirectory contents?

 

benevolent001




msg:1525246
 2:07 pm on Dec 30, 2004 (gmt 0)

hi
why dont you do the reverse

allow for the directory
disallow for the other subdiretories and this will do what u want

hope this helps
regards

beauzero




msg:1525247
 6:32 pm on Jan 30, 2005 (gmt 0)

IIS yes...can't speak for others. Disallow on the main and apply to all subs. Then go in an open the subs. make sure you reference it somehow though or it will not be found.

Lord Majestic




msg:1525248
 6:36 pm on Jan 30, 2005 (gmt 0)

is it possible to disallow the directory and still allow the subdirectory contents?

No - robots.txt standard calls for case-insensitive match of given disallowed string in a URL that is being checked against robots.txt: since subdirs will all have main dir matched, it means you will disallow access to everything.

You can try however disallowing access to specific files in that main directory ie:

Disallow: /maindir/index.php

This will not be practical for lots of files (and you can't use regular expressions or wildcards in robots.txt), so you might be better off moving subdirs you want to index elsewhere or allowing to index everything.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Search Engines / Sitemaps, Meta Data, and robots.txt
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved