Mobile app version of vmapp.org
Login or Join
Sue5673885

: Stop directory listing using .htaccess and redirect to good error page I have a directory with several sub directories. I found this article Preventing Directory Listing that shows me how to

@Sue5673885

Posted in: #Apache #Error #Gui #Htaccess

I have a directory with several sub directories. I found this article Preventing Directory Listing that shows me how to prevent people from getting the directory listings.

IndexIgnore *


But it produces a bad error page, (it looks like an empty directory listing). Instead I would like to redirect the user to a page or show a better error page when they try to view the directory listings of a sub directory.

I am using Apache

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sue5673885

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sarah324

Try this:

Options -Indexes
ErrorDocument 403 /path/to/403.html

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme