Enable/Disable directory browsing by using web.config - Windows Only

Scenario: Let's say I want to enable directory browsing for a special directory on my site, how do I enable that? It's as easy as: 1) create (or edit) the web.config file in your site's home directory 2) edit it as follows:

<configuration>
<location path="special_directory_name_here">
<system.webServer>
<directoryBrowse enabled="true" />
</system.webServer>
</location>
</configuration>

Note you will need to change the location path to equal the directory name you want to enable directory browsing for. If you want to enable it for the entire site, just remove the entire and tags (which tell IIS7 to scope the configuration changes to just the path specified). To disable directory browsing just set enabled="false" instead of true.

  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

How To Backup Your Web site

This tutorial will teach you how to backup your web site in cPanel. Regular backups of your web...

How To Use Web Disk In CPanel

This tutorial is going to teach you how to Use Web Disk in cPanel. The Web Disk allows you to...

Using Index Manager

This tutorial will teach about using the Index Manager. The Index Manager allows you to customize...

Using File Manager

This tutorial will teach you how to use the File Manager feature in cPanel. File Manager will...

Using the Disk Usage Viewer

This tutorial will teach you how to use the disk usage viewer. The disk usage viewer provides a...