2

So using other PHP frameworks such as Laravel and CI, I can point my virtual host to the same project folder and access it with a different domain. However using Magento 2 the base URL is defined in the database and to access it with multiple domains we need to create multiple websites, I just need to access it from multiple domains without creating multiple website, how to do this?

For example:

I can access the same Magento 2 site using:

1. my.gov
2. mine.gov

if I go to another page:

1. my.gov/customer/account
2. mine.gov/customer/account

it won't change the base URL (without redirecting it)

5
  • 1
    This could not be archived on magento Mar 18, 2020 at 2:33
  • @TuyenNguyen why?
    – jojo
    Mar 18, 2020 at 2:34
  • @TuyenNguyen you are right. Mar 18, 2020 at 7:35
  • Do you want to switch back and forth? And do you want to use this in production? I don't know if that is a good idea. But maybe you could try to set the base url on the fly? But I don't know if this will work since allot will be cached.
    – Akif
    Mar 18, 2020 at 14:54
  • I want to use this in prod, and both the URL can access at the same time
    – jojo
    Mar 19, 2020 at 1:28

0

Your Answer

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

Browse other questions tagged or ask your own question.