From 597e6cc1ee0c8bc41f4d6d5aab2a0f277a368640 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 5 May 2009 23:21:19 -0400 Subject: [PATCH] Allow periods in canonicalized URLs. Signed-off-by: Edward Z. Yang --- htaccess.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htaccess.php b/htaccess.php index a0e3a2b..985e91e 100644 --- a/htaccess.php +++ b/htaccess.php @@ -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]'; -- 2.11.4.GIT