-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefault.htaccess
100 lines (82 loc) · 3.41 KB
/
default.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
RewriteEngine On
<IfModule pagespeed_module>
ModPagespeed on
# using commands,fileters etc
</IfModule>
#RewriteCond %{REQUEST_FILENAME} - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^static/pri/1/(.*) index.php?q=static/pri/1/$1 [L,QSA]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost[NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost.*$ [NC]
RewriteRule ^static/pub/(.*)\.(.*)$ - [F]
RewriteRule ^static/pub/(.*) ../static/pub/$1 [L]
RewriteRule ^resources/bundle.json ../build/resources_cache/resources/bundle.json
RewriteCond %{QUERY_STRING} .*\b_=([^&]*).*
RewriteRule ^(resources|lib)/(.*)\.(css|js)$ ../build/resources_cache/$1/$2-_%1.$3
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^../build/resources_cache/(.*)\.(json|css|js)/(.*)$ index.php?q=buildfile/$2/$1.$2 [ENV=INDEX:true,L,QSA,S=1]
RewriteCond %{QUERY_STRING} .*\b_=([^&]*).*
RewriteRule ^combinejs/(.*)\.(css|js)$ ../build/resources_cache/$1-%1.$2 [ENV=ORIG_URI:$1,ENV=ROUTED:true]
RewriteCond %{ENV:ROUTED} ^true$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^../build/resources_cache/(.*)\.(css|js)/(.*)$ index.php?q=combinejs/$1 [ENV=INDEX:true,L,QSA,S=1]
RewriteRule ^(resources|lib)/(.*)\.(json|css|js|txt|jpeg|jpg|png|gif|eot|svg|ttf|woff|html|css.map|md)$ ../$1/$2.$3 [L]
#RewriteRule ^(resources|lib)/(.*)\.(scss)$ scss/?p=$1/$2.scss [L]
RewriteRule ^(resources|lib)/(.*)\.(scss)$ ../build/resources_cache/$1/$2.css
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^../build/resources_cache/(.*)\.(css)/(.*)$ scss/?p=$1.scss [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [ENV=INDEX:true,L,QSA]
# BEGIN Compress text files
<ifModule mod_deflate.c>
<filesMatch ".(css|js|x?html?|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</ifModule>
# END Compress text files
# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
# END Expire headers
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch ".(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<filesMatch ".(css|scss)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
<filesMatch ".(js)$">
Header set Cache-Control "max-age=216000, private"
</filesMatch>
<filesMatch ".(x?html?|php)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
# BEGIN Turn ETags Off
<ifModule mod_headers.c>
Header unset ETag
</ifModule>
FileETag None
# END Turn ETags Off
# BEGIN Remove Last-Modified Header
<ifModule mod_headers.c>
Header unset Last-Modified
</ifModule>
# END Remove Last-Modified Header