httaccess, dissallow folders?

Discussion in 'PHP' started by izlik, Jan 10, 2008.

  1. #1
    hello, i have some folders set to permission 777 due to the fact that the blogg i use dont work if the folder with the image(s) is not chmoded 777, so i wanted to ask, can i trough httaccess somehow dissallow listing / access from someone who goes to http://mydomain.com/images/ and other folders ?
     
    izlik, Jan 10, 2008 IP
  2. asterix

    asterix Well-Known Member

    Messages:
    1,095
    Likes Received:
    97
    Best Answers:
    0
    Trophy Points:
    165
    #2
    i think by adding this line to your .htaccess file will prevent it from listing the files :

     
    asterix, Jan 10, 2008 IP
  3. Kieran.in

    Kieran.in Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well, i just use


    Options -Indexes
    PHP:
     
    Kieran.in, Jan 10, 2008 IP
  4. izlik

    izlik Well-Known Member

    Messages:
    2,399
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    185
    #4
    izlik, Jan 10, 2008 IP
  5. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #5
    wing, Jan 11, 2008 IP
  6. surya_143s

    surya_143s Banned

    Messages:
    51
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    keep this for security

    
    <FilesMatch "(.php|.html)$">
      Order allow,deny
    </FilesMatch>
    
    Code (markup):
    any php html file (hacking shells) in the directory wont be accessible direktly ..

    then if u have cpanel there is index manager option to disallow indexing
    [​IMG]
     
    surya_143s, Jan 11, 2008 IP
  7. izlik

    izlik Well-Known Member

    Messages:
    2,399
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    185
    #7
    there is nothing like this that would work is there ?

    order deny,allow
    deny from all
    deny from */uploads/*
    allow from all
     
    izlik, Jan 12, 2008 IP