29 lines
734B

  1. Options -Indexes
  2. #<IfModule mod_rewrite.c>
  3. # RewriteEngine on
  4. # RewriteCond %{REQUEST_URI} !^public
  5. # RewriteRule ^(.*)$ frontend/web/$1 [L]
  6. #</IfModule>
  7. <IfModule mod_rewrite.c>
  8. RewriteEngine on
  9. RewriteCond %{REQUEST_URI} !^/backend/web/(assets|css)/
  10. RewriteCond %{REQUEST_URI} admin
  11. RewriteRule .* backend/web/index.php [L]
  12. RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|css|img)/
  13. RewriteCond %{REQUEST_FILENAME} !-f
  14. RewriteCond %{REQUEST_URI} !admin
  15. RewriteRule .* frontend/web/index.php [L]
  16. </IfModule>
  17. # Deny accessing below extensions
  18. <Files ~ "(\.json|\.lock|\.git)">
  19. Order allow,deny
  20. Deny from all
  21. </Files>
  22. # Deny accessing dot files
  23. RewriteRule (^\.|/\.) - [F]