-
Notifications
You must be signed in to change notification settings - Fork 29
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
Create redirect on alias update #27
base: develop
Are you sure you want to change the base?
Conversation
…nder and OnDocFormSave - Modified plugin.redirector.php to capture alias prior to save (OnDocFormRender). If the alias has changed and the system settings permit then add a new redirect record (OnDocFormSave) - Created new system setting: redirector.on_alias_update (Yes/No) - Updated readme.txt
It looks like you accidentally committed the change of the sample build configs to your local build configs, may want to try and correct that if you can :) Also looks like you added a changelog entry to the readme instead of the changelog file? |
Thanks for noticing those. I'll get them corrected and committed. I wasn't sure if it was my place to change the changelog.txt file, but I will do now you've suggested it. |
- Removed local build configs from repo. - docs/readme.txt entry moved to docs/changelog.txt
Thanks Mark, I've made those changes now. |
This looks like an awesome feature. I'm working on merging some PRs into the new location at modxcms/Redirector. Would love some help coming up to with some tests to make sure it is ready. |
Manually merged in to new version.. PR on modxcms soon! Also; renamed setting to "track_uri_updates" and made it combo-boolean type. Tracking alias changes only isn't enough. Because when you have/child/pages/ Redirector need to have the whole path instead of the alias of the resource itself. |
Updated regex redirect checker.
Added the ability for redirects to be created whenever a resource alias has changed. This will help none-technical users who aren't familiar with setting up 301 redirects or forget it's importance. The redirect will only be created if a record for that resource does not already exist. This can be enabled/disabled via system settings if required.