diff --git a/web/sites/default/settings.local.php b/web/sites/default/settings.local.php index 754e66b5fa98c504f80f016c1cf9f0e3b7dd7ae7..8e806593d7193a5241c6195b7f06ef1f164e95a1 100644 --- a/web/sites/default/settings.local.php +++ b/web/sites/default/settings.local.php @@ -16,23 +16,6 @@ $variables = array(); } -/** - * Redirect www.*.osu.edu to *.osu.edu - */ -if (!$cli && preg_match('/^www\.(.+)\.osu\.edu$/', $_SERVER["HTTP_HOST"], $matches)) { - $redirect_url = 'https://' . $matches[1] . ".osu.edu" . $_SERVER["REQUEST_URI"]; - - if (extension_loaded('newrelic')) { - newrelic_name_transaction("redirect"); - } - - $response_code = 302; - header("HTTP/1.0 $response_code Moved"); - header("Location: $redirect_url"); - exit(); -} - - /** * Pantheon-specific settings */ diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index aded6f28109aad6377e0bd916fd348f59beba767..f083a030ee7ed5c394fe54fdd26de5d425b8775b 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -61,6 +61,22 @@ include $redirects_file; } +/** + * Redirect www.*.osu.edu to *.osu.edu + */ +if (!$cli && preg_match('/^www\.(.+)\.osu\.edu$/', $_SERVER["HTTP_HOST"], $matches)) { + $redirect_url = 'https://' . $matches[1] . ".osu.edu" . $_SERVER["REQUEST_URI"]; + + if (extension_loaded('newrelic')) { + newrelic_name_transaction("redirect"); + } + + $response_code = 302; + header("HTTP/1.0 $response_code Moved"); + header("Location: $redirect_url"); + exit(); +} + /** * Always install the 'standard' profile to stop the installer from * modifying settings.php.