PDA

View Full Version : root and/or sub directory access


xproductionz
8-28-05, 01:55 PM
okay i didnt know where to post this and i tried searching but it wasnt specific to my question...

how do i stop someone from viewing the contents of the folder.. for example

lets say i have a video in folder
www.mydomain.com/videos/car.mpg

then lets say someone decides to change the address to see its contents to something like this
www.mydomain.com/videos

how would i stop someone from seeing the contents listed in the folder but still be accessible by naming a specific file in the foler like video1.mpg or video2.mpg

tbonekkt
8-28-05, 01:57 PM
Add the following to your .htaccess file for /videos/:Options -IndexesOr you can always simply upload a blank index.html file.

xproductionz
8-28-05, 05:41 PM
so i would have to do that to every single folder i dont want people to access?

xproductionz
8-28-05, 05:42 PM
well the thing is that if you type in the sub directory i want it to say FORBIDDEN like how is says on some site and not list whats there..

tbonekkt
8-28-05, 06:45 PM
so i would have to do that to every single folder i dont want people to access?Well, if you put the .htaccess code above in your htdocs .htaccess, then it'll filter down. So no, you wouldn't have to do it for every single folder.

Using the .htaccess method will achieve the 403 you desire.

mrandall131
8-29-05, 09:13 AM
And where do you modify the file, the site manager?

mrandall131
8-29-05, 09:14 AM
I did the blank index file for now, but it doesn't come up with an error, just a blank screen, is that right?

snowmaker
8-29-05, 09:22 AM
Ya that's right. You could edit that index file to have a 'forbidden' message if you want.

mrandall131
8-29-05, 10:12 AM
Thanks!!