Anchor rewrite rules
authorJoachim Breitner <mail@joachim-breitner.de>
Mon, 11 Aug 2008 01:56:47 +0000 (01:56 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Mon, 11 Aug 2008 01:56:47 +0000 (01:56 +0000)
apt-repository-merge

index 3162403..ae3b05c 100644 (file)
@@ -153,7 +153,7 @@ for dir, rewrites in rewrite_rules_by_dir.items():
     readme.write("This is a directory with the following redirects set up:\n\n")
     for filename, base in rewrites:
        filename_escape = re.sub('\+','\\+',filename)
-       htaccess.write("RewriteRule (%s) %s/%s/$1 [R]\n" %
+       htaccess.write("RewriteRule ^(%s)$ %s/%s/$1 [R]\n" %
                (filename_escape, base, dir) )
        readme.write("%s -> %s/%s/%s\n" %
                (filename, base, dir, filename) )