Possible fix for badly rewritten links
authorRoland Häder <roland@mxchange.org>
Tue, 10 Mar 2009 20:24:40 +0000 (20:24 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 10 Mar 2009 20:24:40 +0000 (20:24 +0000)
inc/libs/rewrite_functions.php

index 2b1a74b..36399f1 100644 (file)
@@ -54,12 +54,11 @@ function REWRITE_LINKS ($HTML) {
        $target = constant('URL')."/cms/";
 
        // Convert modules.php?module=...
-       $test = preg_replace("/".$URL."\\/modules.php\\?module=/i", $target, $HTML);
+       $test = preg_replace("/".$URL."/modules.php?module=/i", $target, $HTML);
 
        if (eregi(SERVER_URL, $test)) {
-               // Konvert URLs from my server
-               $URL = str_replace("/", "\\/", constant('SERVER_URL'));
-               $test = preg_replace("/".$URL."\\/modules.php\\?module=/i", constant('SERVER_URL')."/cms/", $test);
+               // Convert URLs from my server
+               $test = preg_replace("/".constant('SERVER_URL')."/modules.php?module=/i", constant('SERVER_URL')."/cms/", $test);
        } // END - if
 
        // Strip slashes as above for the main URL