Created
November 14, 2019 11:58
-
-
Save imiroslavov/f70f8ec6c2e6613f2fbc7c64819715d5 to your computer and use it in GitHub Desktop.
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
<VirtualHost *:80> | |
ServerName hostname | |
DocumentRoot /path/to/web | |
DirectoryIndex app.php | |
<Directory /path/to/web> | |
Require all granted | |
AllowOverride None | |
</Directory> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ | |
RewriteRule ^(.*) - [E=BASE:%1] | |
RewriteCond %{ENV:REDIRECT_STATUS} ^$ | |
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f | |
RewriteRule .? %{ENV:BASE}/app.php [L] | |
</IfModule> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Saved the day for me today! Thanks!!!