Forum Moderators: phranque

Message Too Old, No Replies

Prevent a directory from being listed

         

CyberMaxx

2:45 pm on Apr 1, 2003 (gmt 0)

10+ Year Member



Hi,

I know that one can prevent a directory from being listed using this: IndexIgnore * in a .HTACCESS file but can I also redirect him/here to a custom error page afterwards?

Thanks,
Maxx

CyberMaxx

3:08 pm on Apr 1, 2003 (gmt 0)

10+ Year Member



Nevermind guys!

I found the solution to my problem: Options -Indexes (In the root .HTACCESS file)

Thanks anyway,
Maxx

sugarkane

3:18 pm on Apr 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld Maxx, glad to see you found the solution.

For the sake of completeness, adding ErrorDocument 403 /yourcustompage.html to the .htaccess allows you to replace the default 'Forbidden' page with a custom error page.