From: Edward Z. Yang Date: Wed, 6 May 2009 03:21:19 +0000 (-0400) Subject: Allow periods in canonicalized URLs. X-Git-Url: https://repo.or.cz/w/xhtml-compiler.git/commitdiff_plain/597e6cc1ee0c8bc41f4d6d5aab2a0f277a368640 Allow periods in canonicalized URLs. Signed-off-by: Edward Z. Yang --- 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]';