[resolved] Index of Images showing? (7 posts)

  1. synergy4
    Posted 4 years ago #


    When I right-click "view background image" in Firefox I get a directory of my images showing as a list. There is no background image so I would expect it to be a blank white page. Here it is:


    Is there any way to stop this as I don't like it and it may be a security risk for my site.

    Thanks in advance.

  2. That's something you can do in .htaccess :)

    http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/#sec3 has a few suggestions.

  3. Cudazi
    Posted 4 years ago #

    If you're not comfortable with editing the .htaccess file, you can also manage this through your server's control panel if you have access. It may be under manage indexes, directory browsing or similar depending on your host.

  4. synergy4
    Posted 4 years ago #

    Thanks Ipstenu and cudazi for your kind replies and i'll try and implement both of your suggestions.

  5. Tim Griffin
    Posted 4 years ago #


    Another option is to upload a blank index.html file.
    This will effectively hide the directory listing on most web hosts.

    I'd go with the .htaccess route personally.

  6. Yeah, but then you have to do that for EVERY single folder. htaccess is everything.

  7. synergy4
    Posted 4 years ago #

    Hey guys, I used the .htaccess route and it stopped the index of images from showing. It does something else now, which you can see if you click the link in my first post, but is way better than before. In the url it shows you the path to the images folder, better than listing each image down the page.

    Here's the code I put in the .htaccess file:

    # disable directory browsing
    Options All -Indexes

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.