Created
August 13, 2015 19:40
-
-
Save sameg14/e7b0352dff53da43bc8d to your computer and use it in GitHub Desktop.
Symfony app_dev.php htaccess file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectoryIndex app_dev.php | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ | |
RewriteRule ^(.*) - [E=BASE:%1] | |
RewriteCond %{HTTP:Authorization} . | |
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
RewriteCond %{ENV:REDIRECT_STATUS} ^$ | |
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteRule .? - [L] | |
RewriteRule .? %{ENV:BASE}/app_dev.php [L] | |
</IfModule> | |
<IfModule !mod_rewrite.c> | |
<IfModule mod_alias.c> | |
RedirectMatch 302 ^/$ /app_dev.php/ | |
</IfModule> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment