getgrav / grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

Home Page:https://getgrav.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

redirect_trailing_slash doesn't work with custom_base_url

ViliusS opened this issue · comments

redirect_trailing_slash funcionality doesn't respect custom_base_url path. For example https://my.example.com/custombaseurl/page1/ will be redirected to https://my.example.com/page1

It looks like $url in Location: redirect here doesn't include custom_base_url at all:

return new Response($code, ['Location' => $url]);

Sadly, I'm not sure what is the best way to fix this.