Disallow /images/ but allow /images/dir/dir. Is it possible?

Discussion in 'robots.txt' started by Phishie, Jun 21, 2007.

  1. #1
    Hello.

    I would like to disallow access to /images/ and directories under it. But I would like to allow access to one directory that is under /images/. Any idea how I would allow this?

    Or is it just impossible?
     
    Phishie, Jun 21, 2007 IP
  2. readme

    readme Banned

    Messages:
    103
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Actually if you disallow access to /images/ then you are disallowing access to the files inside of it, isn't it? :)
     
    readme, Jun 22, 2007 IP
  3. explorer

    explorer Well-Known Member

    Messages:
    463
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    110
    #3
    What you're wanting to do is possible - provided the bots recognize the "allow" command - googlebot and yahoo's slurp definitely do.

    Disallow: /folder1/
    Allow: /folder1/myfile.html

    bans bots from all of folder1 except for myfile.html

    Disallow: /images/
    Allow: /images/folder1/

    should do the trick for you.

    p.s. I've not done this personally.
     
    explorer, Jun 30, 2007 IP
  4. trichnosis

    trichnosis Prominent Member

    Messages:
    13,785
    Likes Received:
    333
    Best Answers:
    0
    Trophy Points:
    300
    #4
    why dont you create another folder like /images2/ under your root directory?
     
    trichnosis, Jul 3, 2007 IP