Created
February 10, 2020 10:20
-
-
Save Daniel-Rafique/3acd9ff7288e1a99e8ceda4f8c5c4713 to your computer and use it in GitHub Desktop.
Multisite setup using Valet+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class LocalValetDriver extends Magento2ValetDriver { | |
public function frontControllerPath($sitePath, $siteName, $uri) | |
{ | |
if ($_SERVER['HTTP_HOST'] === 'm2.dev') { | |
$_SERVER['MAGE_RUN_CODE'] = 'base'; | |
$_SERVER['MAGE_RUN_TYPE'] = 'website'; | |
} | |
if ($_SERVER['HTTP_HOST'] === 'us.m2.dev') { | |
$_SERVER['MAGE_RUN_CODE'] = 'us_website'; | |
$_SERVER['MAGE_RUN_TYPE'] = 'website'; | |
} | |
if ($_SERVER['HTTP_HOST'] === 'eu.m2.dev') { | |
$_SERVER['MAGE_RUN_CODE'] = 'eu_website'; | |
$_SERVER['MAGE_RUN_TYPE'] = 'website'; | |
} | |
return parent::frontControllerPath($sitePath, $siteName, $uri); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment