Fix “htaccess: Options not allowed here” error

By | May 29, 2013

Sometimes when you are adding directives to the htaccess file you get errors. Once such error is

htaccess: Options not allowed here

It occurs when using the Options directive like this

Options -Indexes

The error basically indicates that the htaccess file is not allowed to use the Options directive to change the settings.
To fix this edit the apache configuration file, which is located at

/etc/apache2/sites-enabled/000-default
$ gksudo gedit /etc/apache2/sites-enabled/000-default

Look out for directory tag for /var/www and add "Options" to the AllowOverride list. It should looks like this

<Directory /var/www/>
	Options Indexes FollowSymLinks MultiViews
	AllowOverride FileInfo Options
	Order allow,deny
	allow from all
</Directory>

Adding "Options" to the AllowOverride list, will permit the use of Options directive in htaccess file.
This will fix the error.

References

http://httpd.apache.org/docs/current/mod/core.html#allowoverride





Last Updated On : 25th October 2013

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *