Home » Web Tips » How to restrict direct access (from browser) to a folder

How to restrict direct access (from browser) to a folder

Simply put an empty index.html file to the folder. It will prevent the direct access to that folder.
Another way is that:
Put the following code into htaccess file
Options -Indexes
This will produce a 403 HTTP Status code on folder content listing.

One comment

  1. Thanks, Great hack by Index.htm file

Leave a Reply

x

Check Also

website development

How to disable AdBlock extensions for a particular website

Example website is smarttips.in ,replace with your website and guide your users to disable the ...