When a web browser is pointed to a directory on your website which does not have an index.html file in it, the files in that directory can be listed on a web page.
Directory Lister is a simple PHP script that lists the contents of any web-accessible directory and allows navigating therewithin. Simply upload Directory Lister to any directory and get immediate access to all files and sub-directories under that directory. Directory Lister is written in PHP and distributed under the MIT License.
Directory Lister requires PHP 5.3+ to work properly. For more information on PHP, please visit http://www.php.net.
steps to set up directory listing:
- Open “public_html” and Upload “index.php” and “resources” folder.
- Now go to “resources” directory and rename “default.config.php” to “config.php”.
- Also, upload additional files to the same directory as index.php.
- All Done!!!
Enable / Disable directory index listing.
To have the web server produce a list of files for directories, use the below line in your .htaccess (can be found in FTP -> public_html folder):
To have an error (403 – Forbidden) returned instead, use this line:
When enabled you can visit your website to see Directory listing.
Hope, this post was helpful.