-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
28 lines (23 loc) · 942 Bytes
/
.htaccess
File metadata and controls
28 lines (23 loc) · 942 Bytes
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
<ifModule mod_rewrite.c>
RewriteEngine On
# Redirection to HTTPS:
RewriteCond %{HTTPS} !on
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# RewriteBase /sites
# RewriteCond %{HTTP:Accept} text/html
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^sites/([a-z0-9_-]+)/.*$ "/sites/$1/index.html" [QSA,L]
RewriteCond %{HTTP:Accept} text/html
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -s [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^sites/([a-z0-9_-]+)/.*$ - [NC,L]
# Redirect all non-file routes to index.html
RewriteRule ^sites/([a-z0-9_-]+)/.*$ sites/$1/index.html [NC,L]
</ifModule>
#Gzip
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
#End Gzip