/
.htaccess
31 lines (23 loc) · 933 Bytes
/
.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
AddType application/octet-stream .pk3 .zip
AddType application/x-gzip .gz .txt.gz
Header set Access-Control-Allow-Origin "http://dengine.net"
ErrorDocument 404 index.php
RewriteEngine on
RewriteBase /
# Redirect www subdomain.
RewriteCond %{HTTP_HOST} www\.dengine\.net [NC]
RewriteRule ^(.*)$ http://dengine.net/$1 [R=301,QSA,L]
RewriteRule ^builds$ http://api.dengine.net/1/builds [R=301,L]
RewriteRule ^build([0-9]+)/?$ http://api.dengine.net/1/builds?number=$1&format=html [R=301,L]
RewriteCond %{REQUEST_URI} support
RewriteRule ^(.*)$ talk/categories/technical-support [R=301,L]
RewriteCond %{REQUEST_URI} forums.*
RewriteRule ^forums(.*)$ talk$1 [R=301,QSA,L]
# Remove trailing slash.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.*)/$
RewriteRule ^(.*)/$ $1 [R=301,L]
# Append .php extension.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) $1.php [L,QSA]