MidCOM svn: r17741 - branches/MidCOM_2_8/midcom.core

rambo midcom-commits at lists.midgard-project.org
Fri Sep 26 20:27:23 CEST 2008


Author: rambo
Date: Fri Sep 26 20:27:23 2008
New Revision: 17741
URL: http://trac.midgard-project.org/software/changeset/17741

Log:
disable this redirect by default, use "SetEnv MIDCOM_COMPAT_REDIR 1" in apache config to enable

Modified:
   branches/MidCOM_2_8/midcom.core/midcom.php

Modified: branches/MidCOM_2_8/midcom.core/midcom.php
==============================================================================
--- branches/MidCOM_2_8/midcom.core/midcom.php	(original)
+++ branches/MidCOM_2_8/midcom.core/midcom.php	Fri Sep 26 20:27:23 2008
@@ -30,7 +30,11 @@
  * 2008-09-26: Now also rewrites urls ending in .html to end with trailing slash.
  */
 $redirect_test_uri = (string)$_SERVER['REQUEST_URI'];
-$redirect_test_uri = preg_replace('/\.html$/', '', $redirect_test_uri);
+if (   isset($_SERVER['MIDCOM_COMPAT_REDIR'])
+    && (bool)$_SERVER['MIDCOM_COMPAT_REDIR'] === true)
+{
+    $redirect_test_uri = preg_replace('/\.html$/', '', $redirect_test_uri);
+}
 if (   !preg_match('%\?|/$|midcom-.+-|/.+\..+$%', $redirect_test_uri)
     && (   !isset($_POST)
         || empty($_POST))


More information about the midcom-commits mailing list