sddns/.htaccess

38 lines
1.1 KiB
ApacheConf

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