diff --git a/mercator.php b/mercator.php index c1f66b8..4eef1ad 100644 --- a/mercator.php +++ b/mercator.php @@ -14,7 +14,7 @@ /** * Current version of Mercator. */ -const VERSION = '1.0.1'; +const VERSION = '1.0.2'; require __DIR__ . '/class-mapping.php'; require __DIR__ . '/class-network-mapping.php'; @@ -332,6 +332,7 @@ function mangle_url( $url, $path, $orig_scheme, $site_id = 0 ) { // Replace the domain $domain = parse_url( $url, PHP_URL_HOST ); + $domain = rtrim( $domain . $current_mapping->get_site()->path, '/' ); $regex = '#^(\w+://)' . preg_quote( $domain, '#' ) . '#i'; $mangled = preg_replace( $regex, '${1}' . $current_mapping->get_domain(), $url );