1

How would I create 301 redirects from my old domain URLs to my new M2 site URLs?

2 Answers 2

1

There are a few ways:

  • In the .htaccess or VirtualHost configuration of Apache or nginx
  • A Router observer in Magento that maps a regex of particular patterns to rewrite to the new Magento location from your legacy application's URL
  • Create records in the core_url_rewrite table
0

This function is built into Magento2 already, guide below:

https://docs.nexcess.net/article/how-to-write-redirect-301-rules-for-magento-2.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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