ZendFramework FollowSymLinks or SymLinksIfOwnerMatch error in XAMPP

Problem:
You may be getting a 403 error and if you look at the logs you should find something similar to the following:

[error] [client 127.0.0.1] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /Applications/xampp/xamppfiles/htdocs/project/public/index.php

Solution:

In your .htaccess file add the following line to the begining of the file:

[php]Options +FollowSymLinks[/php]

ZendFramework .htaccess ships with the following as default:

[php]RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ – [NC,L]
RewriteRule ^.*$ index.php [NC,L][/php]

Adding the two lines above fixes the problem. So the file should look like this:
[php]Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ – [NC,L]
RewriteRule ^.*$ index.php [NC,L][/php]

← Back to home