-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
28 lines (23 loc) · 828 Bytes
/
.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
<IfModule mime_module>
AddHandler application/x-httpd-ea-php80___lsphp .php .php8 .phtml
</IfModule>
<IfModule mod_rewrite.c>
# Configure rewrite rules
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# Force the domain to serve securely
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Header always set Content-Security-Policy "upgrade-insecure-requests;"
# Force www in the URL
#RewriteCond %{HTTP_HOST} ^[^.]+.[^.]+$
#RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Remove www in the URL
RewriteCond %{HTTP_HOST} ^www.((?:[^.]+.)+[^.]+)$
RewriteRule .* https://%1 [L,R=301]
# Redirect to the web directory
RewriteRule (.*) /web/$1 [L]
</IfModule>