-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
[RedirectBundle] Automatically generate redirects #2831
base: master
Are you sure you want to change the base?
Conversation
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.
Hi @, your PR needs some changes
- This PR seems to need a milestone of a minor release.
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.
Hi @, your PR passed all our requirements.
Thank you for contributing!
@JZuidema I'm thinking if we need the marker interface at all, would it make sense to have a configuration option in the node bundle to activitate auto redirects for all cms pages? |
I temporary removed the milestone as this needs some work. I've recently also implemented this in project and one thing missing here is the implementation of the multidomain setup. If you have multiple domains these need be added only for the specific domain. So let's see in 6.x to implement this feature, I will see what I can add from my custom implementation! |
When the slug of a page is changed, if you visit the old url it will result in a 404. This feature will allow Kunstmaan to automatically generate a redirect for each page that implements the
AutoRedirectInterface
When a slug is changed, the subscriber performs these steps:
Here is an example:
This is the current page:
We rename the page to Page B and change the slug accordingly:
We now have one automatically generated redirect:
We rename the page to Page C and change the slug accordingly:
We now have two automatically generated redirects. Both redirects now target
/page-c
(instead ofpage-a
redirecting topage-b
etc)We regret all the name changes, and rename the page back to Page A and change the slug accordingly:
We now still have to redirects where
page-b
andpage-c
both redirect back topage-a