My question is similar to Subdomain database configuration picking up root domain config, but I don't have any custom database variables.
I have a staging site and a (forthcoming) production site on the same remote shared hosting server. The staging site is at a
staging subdomain and the production site will be at the root.
The staging site seems to be using the config variables from the root domain in
db.php. I had to take the production site out of
db.php to get the staging site to work at all, and anywhere I'm using environment variables (like my asset paths), they're coming from the production config instead.
This is my
return array( '*' => array( 'omitScriptNameInUrls' => true, 'generateTransformsBeforePageLoad' => true, 'loginPath' => 'admin', ), 'localhost' => array( 'server' => 'localhost', 'devMode' => true, 'environmentVariables' => array( 'basePath' => 'C:\wamp\www\craftcms', 'baseUrl' => 'localhost/craftcms/', ) ), 'staging.safs.msu.edu' => array( 'server' => '188.8.131.52', 'devMode' => true, 'environmentVariables' => array( 'basePath' => 'staging', 'baseUrl' => 'http://staging.safs.msu.edu', ), ), 'safs.msu.edu' => array( 'server' => '184.108.40.206', 'devMode' => false, 'environmentVariables' => array( 'basePath' => '', 'baseUrl' => 'http://safs.msu.edu', ), ), );
How do I get my config files to recognize the staging subdomain's settings?