How do I hide a directory from web browser

Discussion in 'General troubleshooting' started by Craigsn, May 20, 2015.

  1. I have my websites setup in the Application Starting Point section. Works great. But how do I hide the other directories on my site from being browsed from the web. For example:

    I own 2 domains, myhomesite.com, which is the registered site at Winhost. And I also use mydomain.com as my publicly facing website.


    OK to browse:
    http://mydomain.com (because this is my website)

    Not OK to browser:
    http://myhomesite.com/backups

    What do I need to do to protect my directories from browsing? I can't find anything in the forum on the knowledgebase on "hide folders" or "hide directories", or a few other terms.

    Thanks
     
  2. Elshadriel

    Elshadriel Winhost Staff

    You can disable Directory Browsing by following these instructions:

    1) Log into your site using IIS7 Manager by following the instructions in this Knowledge Base article.
    2) Double click on the Directory Browsing module to open it.
    3) On the right hand side, click on Disable
     
    Last edited by a moderator: Oct 14, 2015
    Michael likes this.
  3. Thanks Elshadriel. That is what I needed. I appreciate your quick response.

    Craig
     
    Michael likes this.
  4. ALTERNATIVELY, just add following entry to the Web.Confg inside the directory you want to disable.

    <directoryBrowse enabled="false" />

    {directoryBrowse enabled="false"}
    substitute curly brackets with angle brackets
     
  5. test do angle brackets work here?
    <directoryBrowse enabled="false" />
     

Share This Page