Skip to content

Commit eed28fa

Browse files
committed
#10250: update phpserver to support versioned static urls
- Coding style update - Regexp updated
1 parent 9e65c06 commit eed28fa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

phpserver/router.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@
6363
$debug($route);
6464

6565
if (strpos($route, 'static/version') === 0) {
66-
  $redirectRoute = preg_replace('#static/version[0–9]*/#','static/', $route, 1);
67-
  $debug("redirect static version string to:" . $redirectRoute);
68-
  header('Location: /'.$redirectRoute);
69-
  exit;
66+
$redirectRoute = preg_replace("/version\d+\//", "", $route, 1);
67+
$redirectDebugInfo = "redirect static version string to: " . $redirectRoute;
68+
$debug($redirectDebugInfo);
69+
header('Location: /' . $redirectRoute);
70+
exit;
7071
}
7172

7273
if (strpos($route, 'media/') === 0 ||

0 commit comments

Comments
 (0)