-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
32 lines (26 loc) · 934 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
29
30
31
32
<IfModule mime_module>
AddHandler application/x-httpd-ea-php80___lsphp .php .php8 .phtml
</IfModule>
<IfModule mod_autoindex.c>
Options -Indexes
</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 client directory
RewriteRule (.*) /client/$1 [L]
</IfModule>