Skip to content

Conversation

@mrodespin
Copy link
Contributor

@mrodespin mrodespin commented Oct 15, 2017

Magento custom url rewrites functionality is not working when adding a redirection of magento controllers. For example a custom redirection from /customer/account/create to another page.

Description

This commit modifies the order that magento loads the routerList pushing urlrewrite router before magento base router. Thats the same order that Magento 1 uses in the function dispatch() on web/app/code/core/Mage/Core/Controller/Varien/Front.php controller.

Related PRs:

#11470
#11471

Fixed Issues (if relevant)

  1. Custom URL Rewrite Not working #10231: Custom URL Rewrite Not working

Manual testing scenarios

  1. Add New Custom URL Rewrite
  2. Set Request Path customer/account/create and Target Path customer/account/login
  3. It should redirect customer/account/create page To customer/account/login page same like Magento 1.x

When adding this modification the expected result is accomplish

Other possible solutions

This is my first option for fix the issue and the other one, if this one is not accepted, it will be add a new router called "customurlrewrite" that only checks for custom url types (Maybe better for performance) and loading it before magento base router.

Annotations

I found that this issue happens in magento 2 and 2.2 version too.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants