-
Notifications
You must be signed in to change notification settings - Fork 3
/
.htaccess
72 lines (61 loc) · 2.66 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Options -Indexes
RewriteEngine On
# In case of redirection problems, uncommenting the following line might help
# RewriteBase /
# In case it's necessary to allow direct access to all files besides those with extensions listed bellow, uncomment the next two lines
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUESt_URI} files/updater-data/.*
RewriteRule ^.*$ - [NC,L]
RewriteCond %{REQUEST_URI} browserconfig\.xml$ [OR]
RewriteCond %{REQUEST_URI} site\.webmanifest$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.(css|js|txt|ico|ttf|xml|svg|gif|png|ogg|jpg)$ - [NC,L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
# Use .phtml files as .php files
AddType application/x-httpd-php .php .phtml
# Compress HTML, CSS, JavaScript, Text, XML a fonts
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
</IfModule>
# Cache for one week (HTTP/1.0)
#<IfModule mod_expires.c>
# ExpiresActive On
# ExpiresDefault "access plus 1 seconds"
# ExpiresByType text/css "access plus 604800 seconds"
# ExpiresByType text/javascript "access plus 604800 seconds"
# ExpiresByType image/png "access plus 604800 seconds"
# ExpiresByType image/gif "access plus 604800 seconds"
# ExpiresByType image/x-icon "access plus 604800 seconds"
# ExpiresByType image/svg+xml "access plus 604800 seconds"
#</IfModule>
# Cache for one week (HTTP/1.1)
#<IfModule mod_headers.c>
# <filesMatch ".(css|js|png|gif|ico|svg)$">
# Header set Cache-Control "max-age=604800, public"
# </filesMatch>
#</IfModule>