This repository has been archived by the owner on Feb 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
76 lines (62 loc) · 2.06 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
73
74
75
76
SetEnv PHP_VER 5_3
SetEnv SESSION_USE_TRANS_SID 0
SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
AddDefaultCharset UTF-8
AddType text/cache-manifest .appcache
<IfModule mod_rewrite.c>
Options +FollowSymlinks
Options -Indexes
RewriteEngine on
RewriteBase /
# Redirect to www. & https
RewriteCond %{HTTPS} off [or]
RewriteCond %{HTTP_HOST} ^infop7.org$ [NC]
RewriteRule ^(.*)$ https://www.infop7.org/$1 [L,R=301]
# Short links
# if the string is not a valid file
RewriteCond %{SCRIPT_FILENAME} !-f
# and if it's not a valid directory
RewriteCond %{SCRIPT_FILENAME} !-d
# For shortened links, use s.infop7.org/<something>
RewriteCond %{HTTP_HOST} ^s.infop7.org$ [NC]
RewriteRule ^_shortlinks/(.*)$ _shortlinks/index.php?uri=/$1 [NC,L,QSA]
# Limonade routes
# if the string is not a valid file
RewriteCond %{SCRIPT_FILENAME} !-f
# and if it's not a valid directory
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^s.infop7.org$ [NC]
RewriteCond %{REQUEST_URI} !=/index.php
# with QSA flag (query string append),
# forces the rewrite engine to append a query string part of the
# substitution string to the existing string, instead of replacing it.
RewriteRule ^(.*)$ index.php?uri=/$1 [NC,L,QSA]
</IfModule>
# pages Expiration
#<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/cache-manifest "access plus 0 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif A2600000
ExpiresByType image/png A2600000
ExpiresByType image/jpeg A2600000
ExpiresByType text/javascript A2600000
ExpiresByType text/plain A2600000
ExpiresByType application/javascript A2600000
ExpiresByType application/x-javascript A2600000
ExpiresByType image/ico A2600000
ExpiresByType image/icon A2600000
ExpiresByType image/x-icon A2600000
ExpiresByType text/css A2600000
ExpiresByType application/x-httpd-php A14400
#</IfModule>
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico)$ no-gzip dont-vary
# Gzip compression
<IfModule mod_deflate.c>
<filesMatch "\.(js|css|html)$">
SetOutputFilter DEFLATE
</filesMatch>
</IfModule>
FileETag none