Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Prevent Directory Listing

Status
Not open for further replies.

unicorn11

Programmer
Jun 10, 2000
392
0
0
IN
How do i stop directory listing on my localhost ? Unicorn11
unicorn11@mailcity.com

[red]Luck is not chance, it's toil; fortune's expensive smile is earned.[red]
 
Are you speaking of not showing a directory listing in the browser when there is no index.html file?

I think placing the following line in a file named .htaccess should work.

Options -Indexes
 
You can also use a path to your root directory in the directory index.

Eg. index.shtml index.html index.htm index.php /error.html

The /error.html will automatically return your users to your choice of a file in your root directory.

Just make sure you have a file called error.html in you root. Wullie

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top