-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
69 lines (54 loc) · 2.11 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
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
#redirect all pages to root
RewriteCond %{THE_REQUEST} "GET /index.php HTTP/1.1"
RewriteRule index\.php http://meetable.io/ [R=301,L]
#redirect all pages to the non-www version
RewriteCond %{HTTP_HOST} !^meetable\.io$ [NC]
RewriteRule ^(.*)$ http://meetable.io/$1 [R=301,L]
# safe include directories
RewriteRule ^js/(.*)$ js/$1 [L]
RewriteRule ^css/(.*)$ css/$1 [L]
RewriteRule ^img/(.*)$ img/$1 [L]
# show landing page for root
RewriteRule ^(.*)$ landing_page.php [QSA,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# compression
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
# example of how to compress ONLY html, plain text and xml
# AddOutputFilterByType DEFLATE text/plain text/html text/xml
# Don't compress binaries
SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|iso|tar|bz2|sit|rar) no-gzip dont-vary
# Don't compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|jpg|ico|png) no-gzip dont-vary
# Don't compress PDFs
SetEnvIfNoCase Request_URI .pdf no-gzip dont-vary
# Don't compress flash files (only relevant if you host your own videos)
SetEnvIfNoCase Request_URI .flv no-gzip dont-vary
# Netscape 4.X has some problems
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
#caching
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"