We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    First of all Override the following file :

    /vendor/magento/module-customer/Model/Account/Redirect.php
    • change redirect URL if login post controller gets 404 error or redirect the customer to a specific page :
      private function applyRedirect($url)
      {
         /* changes start*/
          $baseUrl = $this->storeManager->getStore()->getBaseUrl();
          if($url == $baseUrl.'customer/account/loginPost/'){
              $url = $baseUrl.'customer/account/login/';
          }
         /* changes  end*/
          $this->session->setBeforeAuthUrl($url);
      }

      NOTE:  Override core file in your custom module.

    Fill the below form if you need any Magento relate help/advise/consulting.

    With Only Agency that provides a 24/7 emergency support.

      Get a Free Quote