From 0af1a8ac5a578f5f9610032e985937c9779e74de Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 21 Jun 2007 17:21:04 +0000 Subject: [PATCH] Refine mod_rewrite directives to only apply to pages under XHTML Compiler's jurisdiction, repair common.css styling shortcoming. git-svn-id: http://htmlpurifier.org/svnroot@1194 48356398-32a2-884e-a903-53898d9a118a --- htaccess.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htaccess.php b/htaccess.php index 27568a8..2f51a85 100644 --- a/htaccess.php +++ b/htaccess.php @@ -117,6 +117,10 @@ $new_contents[] = "RewriteRule ^(($full_dir_exp)[^/]+\.html)$ xhtml-compiler/mai $new_contents[] = 'RewriteCond %{QUERY_STRING} purge=1'; $new_contents[] = "RewriteRule ^($full_dir_exp)$ xhtml-compiler/main.php?f=\$1 [L,QSA]"; +// add application/xhtml+xml if the browser supports it +$new_contents[] = 'RewriteCond %{HTTP_ACCEPT} application/xhtml\\+xml'; +$new_contents[] = "RewriteRule ^(($full_dir_exp)[^/]+\.html)$ - \"[T=application/xhtml+xml,L]\""; + // xc-deps are forbidden to outside world $new_contents[] = ''; $new_contents[] = ' Order allow,deny'; -- 2.11.4.GIT