Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <VirtualHost *:80>
- ServerName advanced.local
- #ErrorLog /dev/null
- #LogLevel emerg
- #CustomLog /dev/null combined
- RewriteEngine on
- # the main rewrite rule for the frontend application
- RewriteCond %{REQUEST_URI} !^/(backend/web|admin)
- RewriteRule !^/frontend/web /frontend/web%{REQUEST_URI} [L]
- # redirect to the page without a trailing slash (uncomment if necessary)
- #RewriteCond %{REQUEST_URI} ^/admin/$
- #RewriteRule ^(/admin)/ $1 [L,R=301]
- # disable the trailing slash redirect
- RewriteCond %{REQUEST_URI} ^/admin$
- RewriteRule ^/admin /backend/web/index.php [L]
- # the main rewrite rule for the backend application
- RewriteCond %{REQUEST_URI} ^/admin
- RewriteRule ^/admin(.*) /backend/web$1 [L]
- DocumentRoot /advanced
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- AddDefaultCharset utf-8
- </Directory>
- <Directory /advanced/frontend/web>
- RewriteEngine on
- # if a directory or a file exists, use the request directly
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- # otherwise forward the request to index.php
- RewriteRule . index.php
- Order Allow,Deny
- Allow from all
- </Directory>
- <Directory /advanced/backend/web/>
- RewriteEngine on
- # if a directory or a file exists, use the request directly
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- # otherwise forward the request to index.php
- RewriteRule . index.php
- Order Allow,Deny
- Allow from all
- </Directory>
- <FilesMatch \.(htaccess|htpasswd|svn|git)>
- Deny from all
- Satisfy All
- </FilesMatch>
- </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement