Results 1 to 6 of 6

Thread: Blocking the /images/ folder?

  1. #1
    Join Date
    Aug 2006
    Location
    The land of vikings
    Posts
    37
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Blocking the /images/ folder?

    Hey,

    When I try going into my Images folder from my browser (example: www.mysite.com/images/), I get some kind of overview of all the files in that folder, where anyone can see and download the files. Is there some way to block entrance into folders on my site, but still allows its content to be viewable on the website?

    When I try access Image folders on other sites, I just get a blank page, or an "Access Denied" page. This is what I want too.

    Any help would be very appreciated!

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Add a blank index.html page. At least then your files won't be seen.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Aug 2006
    Location
    The land of vikings
    Posts
    37
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    So I simply put a blank index.html file into any folders that I dont want people to access? Because I got several folders on my site with important configuration files in them, and I dont want some idiot messing them up.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    That works, or you can remove read permission from the folders.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Aug 2006
    Location
    The land of vikings
    Posts
    37
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Cool, thanks for the help guys!

  6. #6
    Join Date
    Mar 2007
    Posts
    68
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    You could also do a simple php redirect, if your server has php set up, if not a javascript redirect, to your homepage.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •