]> git.mxchange.org Git - mailer.git/commitdiff
Last try to fix broken, rewritten links
authorRoland Häder <roland@mxchange.org>
Sat, 14 Mar 2009 19:31:07 +0000 (19:31 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 14 Mar 2009 19:31:07 +0000 (19:31 +0000)
inc/libs/rewrite_functions.php

index 197a46ad7bf313a1d2f5246924accad8e429cf0f..236b440a3c213843401217d5ef643a1506ec1f01 100644 (file)
@@ -51,12 +51,18 @@ function REWRITE_LINKS ($HTML) {
        $target = "{!URL!}/cms/";
 
        // Convert modules.php?module=...
-       $output = str_replace("/" . "{!URL!}/modules.php?module=", $target, $HTML);
+       $output = str_replace(constant('URL') . "/modules.php?module=", $target, $HTML);
+
+       // Convert modules.php?module=...
+       $output = str_replace("{!URL!}/modules.php?module=", $target, $output);
 
        // Do we have an URL linked to mxchange.org?
        if (eregi(constant('SERVER_URL'), $output)) {
                // Convert URLs from my server
-               $output = str_replace("/" . "{!URL!}/modules.php?module=", constant('SERVER_URL')."/cms/", $output);
+               $output = str_replace("{!URL!}/modules.php?module=", constant('SERVER_URL')."/cms/", $output);
+
+               // Convert URLs from my server
+               $output = str_replace(constant('URL') . "/modules.php?module=", constant('SERVER_URL')."/cms/", $output);
        } // END - if
 
        // Strip slashes as above for the main URL