Tried pretty much anything i could find, i did the Virtualhost stuff, put the Rewritebase and rules in my .htaccess, used the code at the top of index.php in the root folder, and made a switch case in the same index.php, but i still have some problems.
The most important being a weird redirecting issue. (note: they aren't meant to redirect)
domain2.com keeps redirecting to domain1.com while www.domain2.com doesn't redirect, this was fixed by turning off caching, but now everything is slow. There has gotta be a better way.
With redirecting fixed, there is still one issue left: domain2 (or the second store, basically) uses the template used by the main store. The template looks nice, but we want a different one.
What is left to check/do?
Any help would be appreciated a ton!
Hello,
Actually I was using index.php to redirect multiple domain names in Magento 1. But in Magento 2, I followed up Magento official document and redirected multiple domain names by apache configuration. I prefer the apache configuration method. Here is the reference for you http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_over.html
Thank you!
Brian C.