Page 1 of 1

setting permissions

Posted: Wed Feb 18, 2004 1:38 pm
by mcog_esteban
hi all.
when building my homepage and created some dir's(images,scripts,etc) and some *.inc files.
my question is :how can i prevent others from browsing this dir's(http://my.homepage/images) and protect the *.inc files?
should i use .htacess files -how?- or there's some other tricks?
thanks.

Posted: Wed Feb 18, 2004 1:43 pm
by markl999
Put an index.html/php in your images directory, then that directory can't be 'browsed'. Though directories without an index file shouldn't be browsable unless you have an 'Options Indexes' in your httpd.conf

You could just rename your .inc files to .php or have .inc files parsed as php by adding .inc to your AddType line in http.conf, something like..
AddType application/x-httpd-php .php .html .inc