$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