changeset 152:9d7f6078264a

Avoid infinite recursion in the rewrite rules.
author Martin Geisler <mg@daimi.au.dk>
date Mon, 28 Jul 2008 00:11:30 +0200
parents fe66ef371c82
children 15a6f5e478ad
files api/.htaccess doc/.htaccess
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/api/.htaccess	Sun Jul 27 23:42:44 2008 +0200
+++ b/api/.htaccess	Mon Jul 28 00:11:30 2008 +0200
@@ -3,7 +3,10 @@
 
 RewriteBase  /api/
 
+RewriteRule ^latest/(.*)$ $1 [L,R=permanent]
+
 # Redirect non-existing files to the tip/*.
+RewriteCond %{REQUEST_URI} !^/api/tip/
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule  ^(.*)$ tip/$1
--- a/doc/.htaccess	Sun Jul 27 23:42:44 2008 +0200
+++ b/doc/.htaccess	Mon Jul 28 00:11:30 2008 +0200
@@ -3,7 +3,10 @@
 
 RewriteBase  /doc/
 
+RewriteRule ^latest/(.*)$ $1 [L,R=permanent]
+
 # Redirect non-existing files to the tip/*.
+RewriteCond %{REQUEST_URI} !^/doc/tip/
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule  ^(.*)$ tip/$1