Showing results for 
Search instead for 
Did you mean: 

Issue with setting up redirect for multi-site

Issue with setting up redirect for multi-site

I am trying to set up 2 domain names with the same magento 2 installation to share the products.

the first one is and the second is I got the front end to load to their respective domains, but in the backend admin section is redirection to a random page on the front end after logging in.

can anyone help or have experience in setting up 2 domains in magento?

I was going off this guide:

and this one:

this is what I was putting in the htaccess file:

enable rewrites

Options +FollowSymLinks
RewriteEngine on
SetEnvIf Host .** MAGE_RUN_CODE=heliosfantasy
SetEnvIf Host .** MAGE_RUN_TYPE=website

and this is what was in the index.php file: