User tests: Successful: Unsuccessful:
This PR implements a flag in the router to mark parsed URLs as tainted. A tainted URL was able to be parsed, but has errors, for example it is missing the suffix or in a site with enabled IDs the alias of an article is wrong. In those cases the URL could be parsed, but it isn't the correct URL. In that cases we don't have to throw a 404, but can redirect to the correct URL. This is implemented in the SEF system plugin here as well, doing a 301 redirect when the URL is marked as tainted. The benefit is, that we prevent multiple redirects when more than one thing is wrong with the URL (for example missing suffix AND wrong alias for an ID)
This PR was made possible by the support of djumla. Thank you for that.
Codereview
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org: joomla/Manual#330
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries Front End Plugins |
Labels |
Added:
Feature
PR-5.3-dev
|
Correct. And if you disable IDs, it would automatically redirect to brian.teeman.net/joomla/full-width-joomla-modules
Thanks for confirming. Will be able to test these two pr correctly now
I have tested this item ✅ successfully on 7d9e478
tested together with #44477
manually typed this url in my browser https://brian.teeman.net/joomla/906-full-width-potatoes.html and it did a 301 redirect to https://brian.teeman.net/joomla/906-full-width-joomla-modules
I have tested this item ✅ successfully on 51f23a9
Tested via both, code review and testing the patch together with #44477
Status | Pending | ⇒ | Ready to Commit |
RTC
Just to make sure I understand this correctly.
This would **for example ** detect this url https://brian.teeman.net/joomla/906-full-width-potatoes and do a 301 redirect to https://brian.teeman.net/joomla/906-full-width-joomla-modules