View Single Post
Old 12-18-2005, 05:58 PM  
porncaster
Registered User
 
Join Date: Oct 2005
Posts: 39
for the record, what you want to do is called blocking directory listing.

ill assume that youre running apache because if youre not, you should be. if you are on shared hosting, forget about the first procedure below and hope that .htaccess is enabled for you. if its not, contact the server admin and ask him to enable it.

if you have access to apaches config file (httpd.conf) and you want to disable directory listing for your ENTIRE server:
- open httpd.conf
- search for <Directory "!webroot!"> where !webroot! is the folder that your html files for the above mentioned domain.com are in (ie. /var/www/html or c:\apache2\htdocs)
- look for a line that says 'Options Indexes FollowSymLinks' immediately after the above line. Remove 'Indexes'.
- restart apache

if you dont have access to httpd.conf, or dont want to turn off directory listing for your entire server, and you have .htaccess enabled:
- in domain.com/directory create a file named .htaccess
- add a single line 'Options FollowSymLinks' and save your changes

if you want to use .htaccess but the above doesnt seem to work, and you have access to httpd.conf:
- find <Directory "!webroot!"> as in the first procedure
- find the following line 'AllowOverride None' and change to 'AllowOverride All'
- restart apache
- do the second above procedure

sick of this yet?

more reading:
http://httpd.apache.org/docs/1.3/howto/htaccess.html
http://javascriptkit.com/howto/htaccess11.shtml

ill get back at you in this thread on the denying access thing. that is a related but potentially an even bigger pain than blocking directory listing.

can you post the vitals on your hosing (shared or not) and software?
__________________
Porncaster.net : Let the porn come to you!!
porncaster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote