-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix GoneDocumentSubscriber by passing sourceHost to RedirectRouteManager #72
Fix GoneDocumentSubscriber by passing sourceHost to RedirectRouteManager #72
Conversation
078945f
to
d5b52d4
Compare
$this->redirectRouteManager->saveByData(['source' => $url, 'statusCode' => 410, 'enabled' => true, 'target' => '']); | ||
$this->redirectRouteManager->saveByData([ | ||
'source' => $url, | ||
'sourceHost' => null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we need to set the webspace domain for pages
aslong as there is no {host}
replacer set. Else if I have a page /test
in 2 webspaces and remove both it should redirect to the correct domain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How could I get the correct domain? I think there could be multiple configured domains for a single webspace, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But not sure if we need to be strict here. I think the worst thing that can happen is that we return a 410
in a webspace that never had a page on that URL, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 possibilities:
A. we create a redirect for every configured domain for the current environment
B. create a redirect only for the main / first domain found in the webspace config for the current environment
For me both is okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already generate all urls
here
$url = parse_url($url, PHP_URL_PATH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But not sure if we need to be strict here. I think the worst thing that can happen is that we return a 410 in a webspace that never had a page on that URL, right?
🤔 thats correct maybe we stay with this solution currently then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! But how can I find out if there was a {host}
replacer in the URL? 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think thats not longer possible as we don't have a method for it 🤔
Why?
See #71