PDA

View Full Version : How to hide Parent Directory?


mnguy003
3-9-05, 01:30 PM
Hi!

My site is up but people have access to my folders. How do I had the contents of hte parent director

Example: www.mysite.com/images

I dont want people to be able to see all of the stuff in the folder /images or any folder !

Thanks

alphadesk
3-9-05, 01:38 PM
Use .htaccess to stop dir browsing ...

Options -Indexes

Or add an empty index.html page.

KimmiKat
3-9-05, 01:43 PM
You can also do a php redirect. You can put this special "index.php" file in all your directories you want to hide and it will bounce your users to the main site.

<?php header("Location:http://www.yourdomainname.com");?>

whl626
3-9-05, 09:56 PM
Is adding this line in .htaccess an option ?

IndexIgnore *

tbonekkt
3-9-05, 10:04 PM
Yes, that is allowed whl626.