Modifying the URI of upcoming requests

28 Views Asked by At

I'm attempting to modify the URI of each request, changing it from /path to /admin/path. I expected this to change the request to the new route, but it continues to return to the old path without any changes.

$newpath = '/regular' . $path;
$request->server->set("REQUEST_URI", $newpath);

return $next($request);
0

There are 0 best solutions below