-
Notifications
You must be signed in to change notification settings - Fork 78
/
htaccess
50 lines (41 loc) · 1.69 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
SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 0
ServerSignature Off
AddDefaultCharset utf-8
Options +FollowSymlinks
Options -Indexes
RewriteEngine On
# Set REQUEST_SCHEME (standard environment variable in Apache 2.4)
RewriteCond %{HTTPS} off
RewriteRule .* - [E=REQUEST_SCHEME:http]
RewriteCond %{HTTPS} on
RewriteRule .* - [E=REQUEST_SCHEME:https]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^pokemon/(.+)$ index.php?page=pokemon&id=$1 [QSA,NC,L]
RewriteRule ^pokestops$ index.php?page=pokestops [QSA,NC,L]
RewriteRule ^gym$ index.php?page=gym [QSA,NC,L]
RewriteRule ^devlog$ index.php?page=devlog [QSA,NC,L]
RewriteRule ^faq$ index.php?page=faq [QSA,NC,L]
RewriteRule ^trainer$ index.php?page=trainer [QSA,NC,L]
RewriteRule ^dashboard$ index.php?page=dashboard [QSA,NC,L]
RewriteRule ^pokemon/$ index.php?page=pokedex [QSA,NC,L]
RewriteRule ^pokemon$ index.php?page=pokedex [QSA,NC,L]
RewriteRule ^nests$ index.php?page=nests [QSA,NC,L]
RewriteRule ^raids$ index.php?page=raids [QSA,NC,L]
RewriteRule ^gymhistory$ index.php?page=gymhistory [QSA,NC,L]
# Cache static files for one month
<ifModule mod_headers.c>
<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css)$">
Header set Cache-Control "max-age=2628000, public"
</FilesMatch>
</IfModule>
# Rules for Versioned Static Files
RewriteRule ^core/(css|js|json)/(.+)\.(\d{10})\.(css|js|json)$ core/$1/$2.$4 [NC,L]
# Enable compression for large content
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript application/x-javascript application/javascript application/json
</IfModule>
</IfModule>