I have a Linux box working with Centos 6.6 with Apache 2.2.x For some unknown reason, enabling the rewrite mechanism causes a 403 error (this happens if I add a rewrite rule or not).
I spent several hours studying this and made changes to my configuration in accordance with the tips that I found in many places, but still did not get anywhere.
Currently in my .htaccess I have this:
<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On </IfModule>
In the directives for the virtual host, I have the following:
DocumentRoot /var/www/html/example.uk <Directory /var/www/html/example.uk> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ServerName example.uk ServerAlias www.example.uk
(This seems to work on Debian, but not on my Centos machine.)
In my httpd.conf I changed
AllowOverride None
to
AllowOverride All
my httpd.conf also contains LoadModule rewrite_module modules/mod_rewrite.so
The error log says:
The FollowSymLinks or SymLinksIfOwnerMatch parameters are disabled, which means that the RewriteRule directive is disabled: /var/www/html/example.uk
Now I have added SymLinksIfOwnerMatch directives to the directives, but this did not solve the problem.
I followed this , and everything seemed to go as it should.
linux apache .htaccess mod-rewrite centos6
Jez d
source share