Hi all,
i have a problem here. I try to disable a directory browsing features at one of my directory with .htaccess.
I have gone thru many article which teach to at this line "Options +Indexes" in the .htaccess and place it in the directory i would like to disable the directory browsing.
But the problem is, i tried this method many time but still cannot get it done.
Is it what i did is wrong? Any idea?
p/s: i dont have the control of the apache configuration file.
How do i disable or enable directory browsing?
Moderator: General Moderators
If you only want to keep people from viewing a list of contents in a directory, you can easily just put an index.php/.html in there and anytime someone tries to view the directory list, it'll just load the index page. If you don't want them to view anything in that directory, you should be able to add a username/password to a .htaccess file, other than that, you're a tad bit out of luck unless you like a ton of work ^_^;
You need to make sure you are allowed to override the settings in a .htacess file...
For example the following in httpd.conf gives the user to use .htaccess freely
For example the following in httpd.conf gives the user to use .htaccess freely
Code: Select all
<VirtualHost *:80>
ServerName localhost
DocumentRoot "e;F:/websites/localhost"e;
<Directory "e;F:/websites/localhost"e;>
AllowOverride All
Options All
</Directory>
</Virtualhost>