Skip to main content
added 447 characters in body
Source Link
brentwpeterson
  • 6.1k
  • 8
  • 45
  • 81

You can try this in your index.php instead

switch($_SERVER['HTTP_HOST']) { case 'broum-utilitaires.com': $mageRunCode = 'broum_utilitaires'; $mageRunType = 'website'; break; case 'broum-utilitaire.fr': $mageRunCode = 'broum_vintage'; $mageRunType = 'website'; break; } 

You also test by replacing one of you codes with BASE to see if it switches between the two

I am adding an example of my .htaccess to accomplish this

RewriteCond %{HTTP_HOST} (.*)?domain1\.com [NC] RewriteRule (.*) - [E=MAGE_RUN_CODE:domain1] RewriteCond %{HTTP_HOST} (.*)?domain1\.com [NC] RewriteRule (.*) - [E=MAGE_RUN_TYPE:website] RewriteCond %{HTTP_HOST} (.*)?domain2\.com [NC] RewriteRule (.*) - [E=MAGE_RUN_CODE:domain2] RewriteCond %{HTTP_HOST} (.*)?domain2\.com [NC] RewriteRule (.*) - [E=MAGE_RUN_TYPE:website] 

Both of these methods work for me

You can try this in your index.php instead

switch($_SERVER['HTTP_HOST']) { case 'broum-utilitaires.com': $mageRunCode = 'broum_utilitaires'; $mageRunType = 'website'; break; case 'broum-utilitaire.fr': $mageRunCode = 'broum_vintage'; $mageRunType = 'website'; break; } 

You also test by replacing one of you codes with BASE to see if it switches between the two

You can try this in your index.php instead

switch($_SERVER['HTTP_HOST']) { case 'broum-utilitaires.com': $mageRunCode = 'broum_utilitaires'; $mageRunType = 'website'; break; case 'broum-utilitaire.fr': $mageRunCode = 'broum_vintage'; $mageRunType = 'website'; break; } 

You also test by replacing one of you codes with BASE to see if it switches between the two

I am adding an example of my .htaccess to accomplish this

RewriteCond %{HTTP_HOST} (.*)?domain1\.com [NC] RewriteRule (.*) - [E=MAGE_RUN_CODE:domain1] RewriteCond %{HTTP_HOST} (.*)?domain1\.com [NC] RewriteRule (.*) - [E=MAGE_RUN_TYPE:website] RewriteCond %{HTTP_HOST} (.*)?domain2\.com [NC] RewriteRule (.*) - [E=MAGE_RUN_CODE:domain2] RewriteCond %{HTTP_HOST} (.*)?domain2\.com [NC] RewriteRule (.*) - [E=MAGE_RUN_TYPE:website] 

Both of these methods work for me

Source Link
brentwpeterson
  • 6.1k
  • 8
  • 45
  • 81

You can try this in your index.php instead

switch($_SERVER['HTTP_HOST']) { case 'broum-utilitaires.com': $mageRunCode = 'broum_utilitaires'; $mageRunType = 'website'; break; case 'broum-utilitaire.fr': $mageRunCode = 'broum_vintage'; $mageRunType = 'website'; break; } 

You also test by replacing one of you codes with BASE to see if it switches between the two