changeset 112:bc2b1bc2d407

Ensure people are redirected to the current API docs.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 18 Mar 2008 22:50:20 +0100
parents 3b72bc5febd3
children 1a06d362d76e
files api/.htaccess
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/api/.htaccess	Tue Mar 18 22:50:20 2008 +0100
@@ -0,0 +1,13 @@
+
+RewriteEngine on
+
+RewriteBase  /api/
+
+# Redirect non-existing files to the latest/*.
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule !^(latest|[0-9](\.[0-9])*)/.*$  - [chain]
+RewriteRule  ^(.*)$ latest/$1 [redirect=permanent]
+
+# Rewrite latest/* to the actual release number.
+RewriteRule ^latest(.*)$ 0.4$1 [redirect]