Advertisement
Guest User

pippuccio76

a guest
Apr 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1.  
  2. <VirtualHost *:80>
  3. ServerName advanced.local
  4. #ErrorLog /dev/null
  5. #LogLevel emerg
  6. #CustomLog /dev/null combined
  7.  
  8. RewriteEngine on
  9. # the main rewrite rule for the frontend application
  10. RewriteCond %{REQUEST_URI} !^/(backend/web|admin)
  11. RewriteRule !^/frontend/web /frontend/web%{REQUEST_URI} [L]
  12. # redirect to the page without a trailing slash (uncomment if necessary)
  13. #RewriteCond %{REQUEST_URI} ^/admin/$
  14. #RewriteRule ^(/admin)/ $1 [L,R=301]
  15. # disable the trailing slash redirect
  16. RewriteCond %{REQUEST_URI} ^/admin$
  17. RewriteRule ^/admin /backend/web/index.php [L]
  18. # the main rewrite rule for the backend application
  19. RewriteCond %{REQUEST_URI} ^/admin
  20. RewriteRule ^/admin(.*) /backend/web$1 [L]
  21.  
  22. DocumentRoot /advanced
  23. <Directory />
  24. Options FollowSymLinks
  25. AllowOverride None
  26. AddDefaultCharset utf-8
  27. </Directory>
  28. <Directory /advanced/frontend/web>
  29. RewriteEngine on
  30. # if a directory or a file exists, use the request directly
  31. RewriteCond %{REQUEST_FILENAME} !-f
  32. RewriteCond %{REQUEST_FILENAME} !-d
  33. # otherwise forward the request to index.php
  34. RewriteRule . index.php
  35.  
  36. Order Allow,Deny
  37. Allow from all
  38. </Directory>
  39. <Directory /advanced/backend/web/>
  40. RewriteEngine on
  41. # if a directory or a file exists, use the request directly
  42. RewriteCond %{REQUEST_FILENAME} !-f
  43. RewriteCond %{REQUEST_FILENAME} !-d
  44. # otherwise forward the request to index.php
  45. RewriteRule . index.php
  46.  
  47. Order Allow,Deny
  48. Allow from all
  49. </Directory>
  50. <FilesMatch \.(htaccess|htpasswd|svn|git)>
  51. Deny from all
  52. Satisfy All
  53. </FilesMatch>
  54. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement