From: Roland Häder Date: Sat, 14 Mar 2009 19:31:07 +0000 (+0000) Subject: Last try to fix broken, rewritten links X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=6c1386d944095ef81ec01b395bab748656341800 Last try to fix broken, rewritten links --- diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php index 197a46ad7b..236b440a3c 100644 --- a/inc/libs/rewrite_functions.php +++ b/inc/libs/rewrite_functions.php @@ -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