-
Notifications
You must be signed in to change notification settings - Fork 19
/
.htaccess
35 lines (29 loc) · 1.02 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
DirectoryIndex index.php
RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#Block access to .env and other files
<Files ~ ".env">
Order Allow,Deny
Deny from all
Satisfy all
</Files>
<Files ~ "^.*\.([Hh][Tt][Aa])">
Order allow,deny
Deny from all
Satisfy all
</Files>
#Disable the 3 lines below for just to http
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/.well-known/.*$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_URI} ^/src/public/ [NC]
RewriteRule ^ - [L]
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteRule ^(.*)$ index.php [QSA,L]
#Add ability to get the authorization headers on the webserver
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0