add one line to your .htaccess root:
deny from all
@QUESTION:
if you want to keep access for yourself:
allow from 192.168.1.1
subscribe to your real IP address as shown in the example.
so all together:
deny from all allow from YOUR_IP
@ question2:
if you deny access to a directory, you deny access to all sites in this directory, for example, "pages". if you say that you want to deny access to a folder in a directory of the same level as the pages, move htaccess inside this folder (simple)
@EDIT:
Open the .htacces file
Parameter Index Search
If Indexes options exist, change it to Options -Indexes or add -Indexes Options as a new line
Directory browsing should now be disabled.
http://www.techiecorner.com/106/how-to-disable-directory-browsing-using-htaccess-apache-web-server/
source share