.htaccess to restrict access to directories
HI
I have a website and you can directly navigate to a directory and it will list all the files.
I need a .htaccess file to restrict the access (i think) but i keep finding information about password protecting the directory. I dont want to do that just avoid any access at all only include the files?
Can anyone help me.
Thanks.
pr0gr4mm3r posted this at 14:05 — 15th October 2008.
He has: 1,502 posts
Joined: Sep 2006
Add this to your .htaccess file in the specific directory you want to limit access to:
Options -Indexes
benf posted this at 21:22 — 15th October 2008.
They have: 426 posts
Joined: Feb 2005
Hi,
Thanks - perfect!
benf posted this at 17:22 — 20th October 2008.
They have: 426 posts
Joined: Feb 2005
Hi
although this restricts file listing i can still go directly to the file in the browser?
How can i stop from directly accessing this. i only want to include this.
Good Value Professional VPS Hosting
pr0gr4mm3r posted this at 18:33 — 20th October 2008.
He has: 1,502 posts
Joined: Sep 2006
What types of files are in that directory?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.