I'd like to have a directory on my site so that, when you go to domain.com/sample/, it'll show the contents in the browser with links to download. I know it's 1 line of code in my .htaccess file, but I'm only a hack when it comes to server code. Does anyone know the line? I'd also like the directory to not be spidered but don't want a password on it.
I assume it's a modification of this line:
<Files ~ "(\.(inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$">
Order deny,allow
Deny from all
</Files>Yes, it's a Drupal install.







try this...
There are two important things to know up front. First, security is a very important issue. If you allow file listings in any directory on your drupal install you've just compromised security. So, this needs to be taken into account if you want to open up file listing access to a directory.
Second, .htaccess files cascade. So, your apache config files setup the site install. Then, an .htaccess file changes some things for a directory and all it's subdirectories. If you have two .htacess files as in the case
drupalinstall/.htaccess
drupalinstall/somefolder/.htaccess
the .htaccess file in the somefolder folder will override the select settings it changes from the one in the directory above it.
What you want to do is have a separate .htaccess file in the directory you want to have a listing that just overrides the directory configuration.
To do this make a blank file called .htaccess with only the following line in it...
Options +Indexes
Matt Farina
Geeks and God Co-Host
www.innovatingtomorrow.net
www.mattfarina.com