Sponsor 1
custom
codes

Disable Access Folder Website with .htaccess


Labels:

Usually hosting will allow people to access the folder via the browser even if the folder is missing its index file. Thus one can immediately see the contents of the folder. To overcome this we can put the index file in the folder. However, this method is not very effective when dealing with a lot of folders that have no index file. Unless you want to wait to enter the index files to any folder.

Another way is more compact (in my opinion) is to use just enough advantage htaccess file write only one file, all the folders will be protected. The disadvantage is not all hosting allow this file.

How to?

first, Create a file named .htaccess then fill like this :

Options All -Indexes

The above command will create the folder can not execute its index that does not exist, except to include a specific file name.

Options All +Indexes

If you want to let everyone be able to execute these folders, you can use the above command use

0 comments:

Post a Comment