Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: incrediBILL
deny from xxx.xxx.xxx.xxx
where xxx.xxx.xxx.xxx is a full or partial IP address.
To keep the Index of/ from being displayed:
you can do it by adding the following statement to your .htaccess file, you only need one in your root, unless you have different rules per directory then you can put an .htaccess in the directory you want it to apply the rule to.
DirectoryIndex index.html index.htm /directory/path/error.html
For a request where no page is specified, the above statement in your .htaccess file would cause the server to look for and display index.html, if it does not exist then it would look for and display index.htm, and if it does not exist it would display error.html from /directory/path, if none of those exist then you will get the directory listing displayed.
Also check that .htaccess is not publicy viewable.
If yourdomain.com/.htaccess displays the contents of .htaccess you can prevent it by adding
deny from all
joined:June 21, 2000
Browsers will still be able to display files within the directory via specific links, but trying to view the directory contents gives a "Forbidden" error.