Magento – Magento 2 URL Redirect (301) not working

magento2url-rewrite

I am trying to redirect account creation to account sign in. I create customer accounts in admin panel instead. However attempting to redirect using Magento's URL Rewrite module is not working for me.

  • URL Rewrite: Custom
  • Store: Default store view
  • Request path: customer/account/create
  • Target path: customer/account/login
  • Redirect Type: Permanent(301)

Upon clicking "create account" in the store, it doesn't redirect to sign in page.

I am using Google Chrome and also tried with Safari. I have cleared my browser cache, reindexed and cached Magento but to no avail.

Here's a photo of my configuration:

enter image description here

Best Answer

It is no longer possible in Magento to overwrite controller routes with url rewrites. In routers list sort order for Magento\Framework\App\Router\Base is 10 and for Magento\UrlRewrite\Controller\Router sort order is 40.

Related Topic