Skip to content

Commit 71724f4

Browse files
MAGETWO-70787: update phpserver to support versioned static urls #10250
2 parents bca81d2 + 38e14de commit 71724f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

phpserver/router.php

+8
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@
6161
}
6262

6363
$debug($route);
64+
65+
if (strpos($route, 'static/version') === 0) {
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;
71+
}
6472

6573
if (strpos($route, 'media/') === 0 ||
6674
strpos($route, 'opt/') === 0 ||

0 commit comments

Comments
 (0)