.htaccess config with symbolic links and index files not working as expected .htaccess config with symbolic links and index files not working as expected php php

.htaccess config with symbolic links and index files not working as expected


Use the -l switch to test for a symbolic link

RewriteEngine On# enable symbolic linksOptions +FollowSymLinksRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-lRewriteRule ^(.+) index.php [L]

Documentation

http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html - ctrl+f for "Treats the TestString as a pathname and tests whether or not it exists, and is a symbolic link."


The -l flag references symbolic links

RewriteEngine On# enable symbolic linksOptions +FollowSymLinksRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-lRewriteRule ^(.+) index.php [L]