User tests: Successful: Unsuccessful:
The current implementation of the redirect application (component and plugin) expects a direct match to act uppon. So, if one wants to manually add a "rewrite rule" for e.g. http(s)://www.domain.tld/path/some-alias?some=param the rule would have to be exactly that url.
There are a couple of scenarios where query params could be added to any url, like when using a newsletter tool or if you've implemented certain affiliate mechanisms, where, especially in case of a relaunch of a website, you would have to create a whole bunch of redirect rules for each and every newsletter and / or affliiate link. Seldom this amount of different redirects can or should be handled via rewrite rules in a .htacces file.
This PR will add to the default behavior in a way that, if no specific (and published) redirect rule was found, it keeps looking for a "fallback".
Here is an example (behavior without the patch).:
If no (published) redirect rule for http(s)://www.domain.tld/path/some-alias?some=param exists, it will lead to a 404 status code.
After the patch, the plugin would also find http(s)://www.domain.tld/path/some-alias and would append the missing params automatically to the redirect url.
$app = JFactory::getApplication(); or $uri = JUri::getInstance();
are common practice and should not need to be explained.Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Router / SEF |
I have tested this item
I've tested this successfully. Works as described, very useful!
Status | Pending | ⇒ | Ready to Commit |
RTC based on testing thanks
Labels |
Added:
?
|
Milestone |
Added: |
Sorry the ????
was not expected
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-30 22:57:24 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
Merged - thanks!
Category | Router / SEF | ⇒ | Front End Plugins Router / SEF |
I have tested this item✅ successfully on 53b4277
followed test instructions and worked fine.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10670.