Skip to content
Snippets Groups Projects
Commit d2bf6b2a authored by Brian Weaver's avatar Brian Weaver
Browse files

Move www.*.osu.edu redirect after other site-specific redirects

parent 47cf93e6
No related merge requests found
...@@ -16,23 +16,6 @@ ...@@ -16,23 +16,6 @@
$variables = array(); $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 * Pantheon-specific settings
*/ */
......
...@@ -61,6 +61,22 @@ ...@@ -61,6 +61,22 @@
include $redirects_file; 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 * Always install the 'standard' profile to stop the installer from
* modifying settings.php. * modifying settings.php.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment