Travel   Technical   About

Fawas Technical Blog

My technical knowledge to share to the societies.
Back-to-Topic-List Don't lets other list files in directory by .htaccess

.htaccess is the important and powerful file that we can use to manage the option of the website, in this topic we will use the .htaccess file to protect from other to browsing the files in directory that has no index file, says that if someone try to copy all of your file in your directory that there is no index.php or index.htm file, they cannot make it easily.

 
1

Notmally the directory that there is no index.xxx file, we can list it as below


for example in fawasblog.com/IMG

Don't lets other list files in directory by .htaccess
2

solution to solve it is very simple,


1. Create new file ' .htaccess ' (including DOT) in your root directory of your website (beside of your index file)


2. write the command Options -Indexes


3. Save and upload to your hosting

Don't lets other list files in directory by .htaccess
3

lets play again to fawasblog.com/IMG 


now you are forbid to list the directory, and every directory too!

Don't lets other list files in directory by .htaccess
   
 
 
 
  HomeTripsWallpapersAbout
 
There is "NO copyright" in fawasblog.com, all detail, sentence, picture can be used without asking permission! :)   2005-2018 by Karn (Fawas) Prapertchob