#93368Domain redirects to records not working anymore
Description
Given domain redirects to records when a domain for such a redirect is requested a 404 error is triggered instead of a redirect.
Criteria to trigger this behavior:
- The
baseof all sites must be a full URL likehttp://example.org/, not simply/(slash). - The incoming domain must not be the
baseof any site. - The redirect must point to a record URN like
t3://record?identifier=<identifier>&uid=<uid>. (There’s an automatic fallback in case oft3://pageURNs.)
The incoming domain does not match the base of any site which is why a NullSite is used instead while matching redirects. Due to this TypoScriptFrontendController::getPageAndRootline() (called from RedirectService::bootFrontendController()) triggers an immediate 404 response. This prevents the record URN to be resolved to a valid URL.
As a workaround one can override RedirectService::getTargetUrl() and fall back to any valid site.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] Domain redirects to records not working anymore Resolves: #93368 Releases: main