Page 1 of 1
prevent directory browsing
Posted: Wed Jan 26, 2005 9:06 am
by mcog_esteban
as the title says...how can i prevent directory browsing with php+apache?
i could use a index.html or php on every forbiden directory and redirect to somewhere else, but i'm looking for other solutions.
Posted: Wed Jan 26, 2005 9:55 am
by CoderGoblin
This should be set up as part of your Apache configuration...
one link you could use (only a starting point).
http://httpd.apache.org/docs/mod/mod_access.html
The idea is that if access is denied you get a 404 error. Unless someone knows the path they have to guess all the information.
Posted: Wed Jan 26, 2005 10:45 am
by feyd
.htaccess has this supported too..
Posted: Wed Jan 26, 2005 12:53 pm
by mcog_esteban
thank you both.
i'll see some examples about it.
Posted: Sun Mar 06, 2005 11:59 pm
by majesticreality
I configured my site so that the nobody can browse directories, but is there anyway to prevent people seeing pages if they do happen to know the full path name to the file?
Posted: Mon Mar 07, 2005 3:42 pm
by thegreatone2176
do what feyd said and use .htaccess for the whole directory