Page 1 of 1

Apache Options -Indexes

Posted: Mon Nov 16, 2009 7:23 pm
by alex.barylski
Here is my current .htaccess file:

Code: Select all

 
RewriteEngine on
RewriteBase /
 
Options -Indexes 
 
RewriteCond %{HTTP_HOST} ^pcspectra.com [NC]
RewriteRule ^(.*)$ http://www.pcspectra.com/$1 [L,R=301]
 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,NC,L]
When I add the line Options -Indexes I get a 500 Internal Server Error, here is the dump from my log file:

Code: Select all

[Mon Nov 16 19:17:32 2009] [alert] [client 192.168.1.104] /var/www/sites/pcspectra.com/www/.htaccess: Option Indexes not allowed here
Is this because I have not allowed AllowOverride or whatever that option is in the main httpd.conf file?

Re: Apache Options -Indexes

Posted: Tue Nov 17, 2009 3:47 am
by VladSun
Options directive
Syntax: Options [+|-]option [[+|-]option] ...
Context: server config, virtual host, directory, .htaccess
Override: Options
Status: core
So it's not because it's not in the httpd.conf.

Try "allowing" it.
http://httpd.apache.org/docs/2.0/mod/co ... owoverride
Indexes
Allow use of the directives controlling directory indexing