.htaccess - Deny Sub Folders, but Not Root Directory

Discussion in 'Programming' started by LindseyInteractive, Dec 28, 2011.

  1. #1
    Hello,

    I am trying to figure out what to put in our .htaccess so that it allows spiders and search engines to crawl my main directory, but I don't want it to crawl any of our sub directories.
     
    LindseyInteractive, Dec 28, 2011 IP
  2. Rikesh

    Rikesh Active Member

    Messages:
    139
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #2
    That's done with robots.txt, not htaccess.
     
    Rikesh, Jan 3, 2012 IP
  3. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #3
    Yeah, use robots.txt

    Here a link that explains it nicely ---> thesitewizard.com/archive/robotstxt.shtml
     
    GMF, Jan 3, 2012 IP