Getting rid of index/directory pages?

Discussion in 'HTML & Website Design' started by tlshaheen, Mar 9, 2010.

  1. #1
    This is a very dumb question, I really should know the answer, but I don't.

    Currently, if you go to mysite.com/afolder/, you'll get a directory listing of the directories contained in it. How do I stop this from appearing?
     
    tlshaheen, Mar 9, 2010 IP
  2. Warll

    Warll Peon

    Messages:
    122
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Change the unix file permissions on the folder, filezilla offers this option and you can just uncheck the "read" permission for quests.
     
    Warll, Mar 9, 2010 IP
    tlshaheen likes this.
  3. Craig B.

    Craig B. Peon

    Messages:
    8
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can also turn off the "Indexes" option for the directory in the httpd.conf or .htaccess files.
     
    Craig B., Mar 9, 2010 IP
    tlshaheen likes this.
  4. tlshaheen

    tlshaheen Peon

    Messages:
    89
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the responses guys, I went with Craig's suggestion, seemed the easiest and it works! Thanks!
     
    tlshaheen, Mar 9, 2010 IP
  5. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    echo "Options -Indexes" >>.htaccess
     
    krsix, Mar 9, 2010 IP
  6. sumanhaldar

    sumanhaldar Active Member

    Messages:
    148
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #6
    I put a blank index.php or index.html file in the directory.
     
    sumanhaldar, Mar 10, 2010 IP