Hi All,
My developer portal is on pantheon ,how i can attach developer portal with proper domain.
Hi,
Kindly add following to your setting.php file file (replace www.example.com
😞
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) && php_sapi_name() != 'cli') { // Redirect to https://$primary_domain in the Live environmentif ($_ENV['PANTHEON_ENVIRONMENT'] === 'live') { /** Replace www.example.com with your registered domain name */ $primary_domain = 'www.example.com'; } else { // Redirect to HTTPS on every Pantheon environment. $primary_domain = $_SERVER['HTTP_HOST']; }
if ($_SERVER['HTTP_HOST'] != $primary_domain || !isset($_SERVER['HTTP_X_SSL']) || $_SERVER['HTTP_X_SSL'] != 'ON' ) {
# Name transaction "redirect" in New Relic for improved reporting (optional)if (extension_loaded('newrelic')) { newrelic_name_transaction("redirect"); }
header('HTTP/1.0 301 Moved Permanently'); header('Location: https://'. $primary_domain . $_SERVER['REQUEST_URI']); exit(); } }
You can also review this from below mentioned url
https://pantheon.io/docs/domains/
Thanks,
Haider
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |