Results 1 to 7 of 7

Thread: How to stop directory browsing on my website

  1. #1
    Join Date
    Jul 2011
    Posts
    2

    Default How to stop directory browsing on my website

    Hi I'm wondering how to stop or block people from accessing my files or directory browsing on my website.
    For example, when i type in www.mysite.com/images/ it displays/lists all the files that are in the images folder. how do I stop this from happening?

    Thank you

  2. #2
    Join Date
    Feb 2009
    Location
    Massachusetts, USA
    Posts
    132

    Default

    Quote Originally Posted by cmanley View Post
    Hi I'm wondering how to stop or block people from accessing my files or directory browsing on my website.
    For example, when i type in www.mysite.com/images/ it displays/lists all the files that are in the images folder. how do I stop this from happening?

    Thank you
    You can put an blank index.html file in your image directory, or you can go to the "advanced" section of your cpanel and click on "index manager". It's self explanatory.

  3. #3

    Default

    I think for this you must go to edit your script, then such kind of problem never happen but most of the people do not like to change the content once they developed the website. And also do testing before the launch this kinda things reduced such kind of threats in the future. I even test my prestshop themes before launching in order check for the purpose of great visibility and to control the collapse in the future.

  4. #4
    Join Date
    May 2008
    Location
    Bahamas, Jamaica
    Posts
    1,331

    Default

    Simple. Edit your site's .htaccess file to include the following.

    ~/public_html/.htaccess
    Code:
    RewriteEngine On
    
    Options -Indexes
    falcon1986.wordpress.com - my blog

    Excellent web hosts - MDDHosting | HawkHost | StableHost

  5. #5
    Join Date
    Jul 2011
    Posts
    2

    Default

    Thanks a lot!!! it worked!!!

  6. #6
    Join Date
    Mar 2013
    Posts
    1

    Default

    Quote Originally Posted by Falcon1986 View Post
    Simple. Edit your site's .htaccess file to include the following.

    ~/public_html/.htaccess
    Code:
    RewriteEngine On
    
    Options -Indexes
    I tried doing this and it still is not working. Not sure if I did something wrong or if it is because I am using Free Web Hosting, but is there another way I can go about stopping directory browsing if this method is not working? Any help would be greatly appreciated. Thanks!
    Last edited by CCDaniels; 04-04-2013 at 10:51 PM.

  7. #7
    Join Date
    Mar 2013
    Posts
    2

Posting Permissions

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