-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.htaccess
52 lines (38 loc) · 1.24 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
# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0
<FilesMatch "\.(ico|pdf|flv)$">
#Header set Cache-Control "max-age=604800, public"
ExpiresDefault A29030400
Header append Cache-Control "public"
</FilesMatch>
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
#Header set Cache-Control "max-age=604800, public"
ExpiresDefault A604800
Header append Cache-Control "public"
</FilesMatch>
<FilesMatch "\.(xml|txt|css|js)$">
#Header set Cache-Control "max-age=31536000, proxy-revalidate"
ExpiresDefault A604800
Header append Cache-Control "proxy-revalidate"
</FilesMatch>
<FilesMatch "\.(html|htm|php)$">
#Header set Cache-Control "max-age=600, private, proxy-revalidate"
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^adresator\.com$
RewriteRule .* http://adresator.com [R=301,L]
RewriteCond %{REQUEST_URI} ^/api/v1
RewriteRule .* /adresator.php?%{QUERY_STRING} [L]
RewriteCond %{REQUEST_URI} ^/?$
RewriteRule .* /adresator_demo.html [L]
# close access for Git directory
RewriteRule ^(.*/)?\.git/ - [F]