Is it possible in magento to redirect existing site one page to another website?

Like. http://magento-website/demo to http://magento-website-2/demo

Without using htaccess and php header function.

Using magento code standard

  • Why don't you use custom URL rewrites? That's exactly what they are doing. – HelgeB Jun 20 '19 at 14:32
  • It's not working with url. – Sweety Masmiya Jun 21 '19 at 3:54

Url rewrites are working in a default Magento environment for external redirects, too. You can redirect almost every path of your store that way, because the check for redirects is done before other Magento routers come into action.

Therefore the rewrite in the below screenshot will do the redirect for your example.

enter image description here

| improve this answer | |
  • It's not work. I already check. – Sweety Masmiya Jun 21 '19 at 6:40
  • As I said, in a clean Magento it works, I have tested rigth that redirect - check your extensions which may interfere that process, especially the order of configured routers (check for routerList entries in your di.xml files). Magento\UrlRewrite\Controller\Router is the router for url rewrites and it should have one of the lowest sortOrders – HelgeB Jun 21 '19 at 6:50
  • Thanks. It's work. – Sweety Masmiya Jun 21 '19 at 7:01

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.