allerta-vvf/backend/.htaccess

39 lines
1.3 KiB
ApacheConf
Raw Permalink Normal View History

2023-02-19 01:40:12 +01:00
# Go to https://gist.github.com/MatteoGheza/17a63a6b27e1b1d37aa62cdba7d7f2b1 for more information
# This is the .htaccess used in production where you can't use a custom root folder
<IfModule mod_rewrite.c>
2021-12-24 17:54:17 +01:00
2023-02-19 01:40:12 +01:00
<IfModule mod_negotiation.c>
2021-12-27 14:19:10 +01:00
2023-02-19 01:40:12 +01:00
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Send Requests To Front Controller...
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Redirect everything that isn't not an existing file or directory to:
# - dist-frontend (try to serve the file from it)
# - using index.php if the requests contains api/*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dist-frontend/$1
RewriteRule ^(.*)api/(.*) index.php [L]
2023-02-23 00:21:06 +01:00
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
RedirectMatch permanent ^(.*)(app|bootstrap|config|database|dist-frontend|public|resources|routes|storage|tests|vendor)/(.*) https://www.youtube.com/watch?v=RfiQYRn7fBg
2023-02-19 01:40:12 +01:00
</IfModule>
2021-12-27 13:01:02 +01:00
DirectoryIndex dist-frontend/index.html