Forum Moderators: phranque

Message Too Old, No Replies

Directory Protection

         

Dr_DOT

2:47 am on Jan 9, 2009 (gmt 0)

10+ Year Member



What would the .htaccess file look like to:
(1) prevent visitors from seeing a directory list of an certain directory
(2) when accessing the directory via '/', or index.* or default.* have the visitor be redirected to the site's Home Page
(3) still enable any documents or images in the directry to be used by the site?
Thanks.

g1smd

1:14 pm on Jan 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What code have you come up with so far?

These topics were covered several hundred times in this forum in 2008.

Do be aware that '/' should be the canonical form for the root page. You should be redirecting TO that one, not to some "longer" URL.