diff --git a/web2/.htaccess b/web2/.htaccess index 3c993bda64..f363fe54e4 100644 --- a/web2/.htaccess +++ b/web2/.htaccess @@ -10,18 +10,21 @@ RewriteBase / RewriteCond %{HTTP_HOST} www\.dengine\.net [NC] RewriteRule ^(.*)$ http://dengine.net/$1 [R=301,QSA,L] -# Redirect builds. 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] +RewriteRule ^build([0-9]+)/?$ http://api.dengine.net/1/builds?number=$1&format=html [R=301,L] -# Static redirects. 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