Disallow search bots beyond the root folder content

Discussion in 'robots.txt' started by Brajeshwar, Jul 26, 2007.

  1. #1
    Hi,

    I'm thinking that robots.txt is the one to do it, so here am I asking for some help. I am not sure if there will also be some work for .htaccess too.

    What I want is to allow agents, search bots in the html/pages of a folder but not inside of any sub-folders (and their contents) inside that folder.
     
    Brajeshwar, Jul 26, 2007 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Dan Schulz, Jul 28, 2007 IP
  3. Brajeshwar

    Brajeshwar Peon

    Messages:
    32
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the link.
    However, I might have lots of sub-folders within that folder and I am not sure what would be their names. Thus I want kind of a automated system like this

    Disallow: /rootfolder/*/

    but here, the wild card is not allowed in robots.txt that is where the problem creeps in.
     
    Brajeshwar, Jul 28, 2007 IP
  4. trichnosis

    trichnosis Prominent Member

    Messages:
    13,785
    Likes Received:
    333
    Best Answers:
    0
    Trophy Points:
    300
    #4
    google and yahoo can understand wild card in robots.txt .

    you can use wild card in robots.txt
     
    trichnosis, Aug 6, 2007 IP
  5. Brajeshwar

    Brajeshwar Peon

    Messages:
    32
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Alright, so according to you, how would you write a robots.txt if you were in my situation?
     
    Brajeshwar, Aug 6, 2007 IP