How to restrict my Image folder from hackers???

Discussion in 'Apache' started by paree_it, Nov 26, 2006.

  1. #1
    Hello there,

    I wanna set the rights for not to display my image folder contents when someone write the path on the browser like:
    http://www.sitename.com/images

    please give the hints on setting the rights on this folder !!!


    Thanks,
    Paree
     
    paree_it, Nov 26, 2006 IP
  2. phree_radical

    phree_radical Peon

    Messages:
    563
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you using Apache? If so, create a file, inside the folder, called .htaccess with this in it:
    Edit: Whoops, bad advice. This will make the images not available at all. Use INV's advice below...
     
    phree_radical, Nov 26, 2006 IP
  3. INV

    INV Peon

    Messages:
    1,686
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    0
    #3
    In .Htaccess you can also just add
    and it wont list the content of a folder if the index.html/php is missing
     
    INV, Nov 26, 2006 IP
  4. paree_it

    paree_it Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for ur time

    Completed successfully BUT i m stuck with other problem that "how to display the 404 error custom message when someone ask for not exist page"

    please guide me..

    Thanks,
    Paree
     
    paree_it, Nov 26, 2006 IP
  5. DrBlackSEO

    DrBlackSEO Peon

    Messages:
    162
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    use cpanel 9 hosting , you can enable this feature
     
    DrBlackSEO, Nov 26, 2006 IP
  6. INV

    INV Peon

    Messages:
    1,686
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    0
    #6
    INV, Nov 26, 2006 IP
  7. paree_it

    paree_it Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7

    Thanks INV,

    I got it !!!

    Thanks again all of u
     
    paree_it, Nov 29, 2006 IP