From 6c1386d944095ef81ec01b395bab748656341800 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 14 Mar 2009 19:31:07 +0000 Subject: [PATCH] Last try to fix broken, rewritten links --- inc/libs/rewrite_functions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.5