-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
37 lines (31 loc) · 1.14 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
RewriteEngine on
# Frontend
RewriteCond %{REQUEST_URI} ^/simple$ [OR]
RewriteCond %{REQUEST_URI} ^/expert$
RewriteRule (.*) $1.php [QSA]
# Actions
RewriteCond %{REQUEST_URI} ^/ip [OR]
RewriteCond %{REQUEST_URI} ^/add [OR]
RewriteCond %{REQUEST_URI} ^/delete [OR]
RewriteCond %{REQUEST_URI} ^/update [OR]
RewriteCond %{REQUEST_URI} ^/admin/cleanup [OR]
RewriteCond %{REQUEST_URI} ^/admin/sync [OR]
RewriteCond %{REQUEST_URI} ^/admin/parse [OR]
RewriteCond %{REQUEST_URI} ^/admin/get [OR]
RewriteCond %{REQUEST_URI} ^/admin/stats/types [OR]
RewriteCond %{REQUEST_URI} ^/admin/stats/hosts
RewriteRule (.*)\.(xml|html|gif|png|txt|csv|json|) $1.php?format=$2 [QSA,S=1]
# Tiny URL
RewriteCond %{HTTP_HOST} ^(s|t).(0l.de)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} /(.+)
RewriteRule .* index.php?host=%1
# Querystring
RewriteCond %{QUERY_STRING} !zone=(0l.de)
RewriteCond %{HTTP_HOST} (0l.de)$
RewriteRule (.*)(\?)? $1?zone=%1 [QSA]
RewriteCond %{QUERY_STRING} !host=[a-z0-9.-]+
RewriteCond %{HTTP_HOST} !^(d|s|t|ip4|ip6)\.(0l.de)$
RewriteCond %{HTTP_HOST} ([a-z0-9.-]+)\.(0l.de)$
RewriteRule (.*)(\?)? $1?host=%1 [QSA]
ExpiresActive Off