After logging out from the account the user is redirected to a page that redirects to the CMS home page of magento. I don't have that page and want to redirect to an external page instead. But I can't find a clean way to change that redirect url to a page outside of magento. I want to redirect to my page root whereas magento resides in https://www.mymagento.com/shop/. The redirect should lead to https://www.mymagento.com/.


Override the logout phtml template and update the redirect url.


Change the $block->getUrl() to the url where you want to be redirected.

$($.mage.redirect("<?php /* @escapeNotVerified */ echo $block->getUrl() ?>", "assign", 5000));
  • @DarsVaeda is the solution working for you? – Mike Jul 14 '17 at 11:00
  • Yep, not the cleanest solution though but at least it works. Thanks. – steros Jul 17 '17 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.