[FIX] Relative root url path handling 4115

Implements [ticket 4115](https://www.openproject.org/work_packages/4115)

* `#4115` [Subdirectory] Broken Redirects

:exclamation: Don't forget to merge into release branch