Welcome to WebmasterWorld Guest from 23.22.250.113

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

preventing index of root dir/foo/bar

preventing index of root_dir/foo/bar

     

neostar

7:36 am on Mar 6, 2010 (gmt 0)

5+ Year Member



Welcome friends,

i got stuck in a problem, thought your help would fix it out

i want to prevent displaying the directory content which does not contain any "index.html", index.php index.wml etc... so what i want to do do is prevent displaying these content like "index of root_dir/foo/bar"

so hows thins possible?

Your help is greatly appreciated,
Thanks

Rajendra

neostar

7:40 am on Mar 6, 2010 (gmt 0)

5+ Year Member



oh i forgot, i use linux, apace(SpeedLite), php as configuration
Thanks

g1smd

8:21 am on Mar 6, 2010 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



If I remember rightly, put this in your .htaccess file:

Options -Indexes


Don't forget to also set:

DirectoryIndex index.html index.php


or whatever you do need.

neostar

8:28 am on Mar 6, 2010 (gmt 0)

5+ Year Member



ok i will try it now...

Thanks, but can u explain what
"Options -Indexes" does?


and "DirectoryIndex index.html index.php" is not for displaying index.php and index.html file as default....

but if i dont have default index.php then how to prevent them?

Thanks for your help

- Rajenrda Pondel

neostar

8:36 am on Mar 6, 2010 (gmt 0)

5+ Year Member



Thank you very much g1smd, "Options -Indexes" does what i want, thank you.

- Rajendra Pondel
 

Featured Threads

Hot Threads This Week

Hot Threads This Month