Enable Browsing Files from a Browser for a Directory

This is all you have to do in order to be able to view files in a directory from any browser. If you try to go to a folder on your server with a browser and get a Forbidden, 404 or 403 error then this is the solution you need. If you go to the folder in a browser and see a webpage instead of files, then you just need to rename the index.html or index.php file to some other name besides “index” because most servers are set up to show index.php or index.html by default if no page is named in the address bar. However if you have already made sure there is no index file in your folder and you still can’t view files because it says Forbidden or some similar error, then do this:

Make sure there is no .htaccess file in the folder to start with. If there is, add the line below to that file instead of uploading a new file.

Otherwise, open up your favorite notebook app that you would use for coding and start a new file. Copy and Paste the following into an empty file:

Options +Indexes

Save the file as .htaccess being sure that it saved with the period before the name. Then upload the new .htaccess file to the directory

One Reply to “Enable Browsing Files from a Browser for a Directory”

Leave a Reply

Your email address will not be published. Required fields are marked *