...

View Full Version : Alternate to Blank index file



lankanmon
07-23-2011, 11:51 PM
Hi I just want to know if there is a .htaccess alternate, instead of placing a blank index.php file in every directory so the contents are not shown.

- possibly to hide the contents of the directory or just a redirect to a page not found global page. I know that's what you do for non existing directories using:



ErrorDocument 400 /error/400.htm
ErrorDocument 401 /error/401.htm
ErrorDocument 403 /error/403.htm
ErrorDocument 404 /error/404.htm
ErrorDocument 500 /error/500.htm


But like I said, I want to make it so that it will redirect even if there is a directory, as long as there is not index file to display to the visitor.

I am new to using .htaccess, so any help is greatly appreciated.

Thank you!

lankanmon
07-25-2011, 04:13 PM
Anyone have any suggestions?

Inigoesdr
07-25-2011, 08:21 PM
In your .htaccess file:

Options -Indexes



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum