Roots Discourse

Multisite - Stage switcher URLs not correct. Set ENVIRONMENTS in application.php

#1

I have a Sub-domain Multisite using Trellis, Bedrock. Stage switcher URLs are acting strange:
From Dev the Staging link leads to subdomain.example.com// and Production (which I have not worked on yet) has the same address.
From Staging the Dev link leads to subdomain.staging.example.dev// and Production to subdomain.staging.example.com//

However, when on the root domain of example.dev or staging.example.com all links look fine…

This is on the application.php
/* Stage switcher plugin */
$envs = [
‘development’ => ‘http://pagesforsages.dev’,
‘staging’ => ‘http://staging.pagesforsages.com’,
‘production’ => ‘http://pagesforsages.com
];
define(‘ENVIRONMENTS’, serialize($envs));

Would the Dev sub-domains not being added cause this?
Dev wordpress_sites.yml:
site_hosts:
- canonical: example.dev
redirects:
- www.example.dev

Staging wordpress_sites.yml:
site_hosts:
- canonical: staging.example.com
- canonical: subdomain.staging.example.com

0 Likes