Skip to content

Commit 41acaba

Browse files
committed
API Sites: Fix versioned URL rewrites
Fixes gh-395 Closes gh-396
1 parent 883f325 commit 41acaba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mu-plugins/api-sites/rewrite-old-api-links.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
list( , $subsite ) = explode( '/', JQUERY_LIVE_SITE, 2 );
1414

1515
$callback = function( $content ) use ( $subsite ) {
16-
$content = preg_replace( '~(href|src)=(["\'])/(?!\d+\.\d+/)(?=/'.JQUERY_LIVE_DOMAIN.')~', '$1=$2/' . $subsite . '/', $content );
16+
$content = preg_replace( '~(href|src)=(["\'])/(?!(\d+\.\d+/|/))~', '$1=$2/' . $subsite . '/', $content );
1717
return $content;
1818
};
1919

0 commit comments

Comments
 (0)