- // replace /local/ with the current domain
- $req['url'] = preg_replace( '#^local/#', $this->params['domain'] . '/', $req['url'] );
- // and prefix it with the service URL
- $req['url'] = $this->params['url'] . $req['url'];
+ if ( $this->params['fixedUrl'] ) {
+ $version = explode( '/', $req['url'] )[1];
+ $req['url'] =
+ str_replace( '#version#', $version, $this->params['url'] ) .
+ preg_replace( '#^local/v./#', '', $req['url'] );
+ } else {
+ // replace /local/ with the current domain
+ $req['url'] = preg_replace( '#^local/#', $this->params['domain'] . '/', $req['url'] );
+ // and prefix it with the service URL
+ $req['url'] = $this->params['url'] . $req['url'];
+ }
+