Allow periods in canonicalized URLs.
authorEdward Z. Yang <edwardzyang@thewritingpot.com>
Wed, 6 May 2009 03:21:19 +0000 (5 23:21 -0400)
committerEdward Z. Yang <edwardzyang@thewritingpot.com>
Wed, 6 May 2009 03:21:19 +0000 (5 23:21 -0400)
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
htaccess.php

index a0e3a2b..985e91e 100644 (file)
@@ -133,8 +133,9 @@ foreach ($allowed_dirs as $dir => $recursive) {
 // allow pretty extension-less URLs for HTML pages
 // this could be generalized for other URLs
 $n[] = 'RewriteCond %{REQUEST_FILENAME} !-f';
+$n[] = 'RewriteCond %{REQUEST_FILENAME}.html -f';
 $n[] = 'RewriteCond %{HTTP_ACCEPT} text/html';
-$n[] = "RewriteRule ^(($full_dir_exp)[^/.]+)$ \$1.html [N]";
+$n[] = "RewriteRule ^(($full_dir_exp)[^/]+)$ \$1.html [N]";
 
 // basic redirection if it doesn't exist
 $n[] = 'RewriteCond %{REQUEST_FILENAME} !-f [OR]';