Have site where lot of parts are made of Angular. For that reason, it was required to use trailing slash before parameter. Like
/search/?query=potato
after "/search". This trailing slash is added in code that makes redirect afterward:
if (strpos($request->getUri(), '/search/') === FALSE) {
// Make sure we load the page with a trailing slash, otherwise the angular app has issues.
$url = preg_replace('/\/search/', '/search/', $request->getUri());
return new RedirectResponse($url);
}
but then redirect module redirects it again without trailing slash (/search?query=potato
), so it makes a redirect loop.
Not an expert in Angular - something could probably be changed so it works, but in general - this could be also not angular need. Maybe some "exception paths" field be added, so this could be configurable? Currently, the only option was to opt-out "Enforce clean and canonical URLs" checkbox. Other ideas how to pass this redirect so it respects custom modules needs?
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.