4 Years
Discussion Span
Last Post by Walther1366

You might be able to disable directory browsing in your web server's configuration. Visitors should then see an HTTP 403 error page instead.

Another option would be to redirect requests for the URL to products.html, or some other page.

If a web server finds a default web page located in the directory it will serve that instead of a directory listing. Default web pages are typically named something like 'index.htm', 'default.aspx', or 'index.php'. It depends on your configuration.

So, if you wish to prevent visitors from browsing a directory, you might get away with simply dropping in an empty default page.

Which web server are you using?

Edited by LaxLoafer


Hi there
Thanx for the reply

I have altered my htaccess file on the server.
Now when a user tries to access a directory it gives the 403 error

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.