Multisite installations should set $base_url in a dynamic fashion, as outlined here. Setting the $base_url to an empty string disables caching and is not recommended.
Modify and use the following example code as necessary to fit your needs, and be sure to add your Remote Administration environment if your application has one:
if (isset($_ENV['AH_SITE_ENVIRONMENT'])) {
switch ($_ENV['AH_SITE_ENVIRONMENT'])
{
case 'dev': $base_url = 'http://dev.example.com';
break;
case 'test': $base_url = 'http://test.example.com';
break;
case 'prod': $base_url = 'http://www.example.com';
break;
}
}You can further modify the preceding code if there are environments that don’t require $base_url to be explicitly set. For example, if the $base_url variable is required only for Production, you can use the following much shorter code snippet:
if (isset($_ENV['AH_SITE_ENVIRONMENT']) && $_ENV['AH_SITE_ENVIRONMENT'] === 'prod') {
$base_url = 'http://www.example.com';
}If this content did not answer your questions, try searching or contacting our support team for further assistance.
Multisite installations should set $base_url in a dynamic fashion, as outlined here. Setting the $base_url to an empty string disables caching and is not recommended.
Modify and use the following example code as necessary to fit your needs, and be sure to add your Remote Administration environment if your application has one:
if (isset($_ENV['AH_SITE_ENVIRONMENT'])) {
switch ($_ENV['AH_SITE_ENVIRONMENT'])
{
case 'dev': $base_url = 'http://dev.example.com';
break;
case 'test': $base_url = 'http://test.example.com';
break;
case 'prod': $base_url = 'http://www.example.com';
break;
}
}You can further modify the preceding code if there are environments that don’t require $base_url to be explicitly set. For example, if the $base_url variable is required only for Production, you can use the following much shorter code snippet:
if (isset($_ENV['AH_SITE_ENVIRONMENT']) && $_ENV['AH_SITE_ENVIRONMENT'] === 'prod') {
$base_url = 'http://www.example.com';
}If this content did not answer your questions, try searching or contacting our support team for further assistance.