Skip to content

Instantly share code, notes, and snippets.

@ryanburgess
Created January 28, 2014 02:03
Show Gist options
  • Select an option

  • Save ryanburgess/8661169 to your computer and use it in GitHub Desktop.

Select an option

Save ryanburgess/8661169 to your computer and use it in GitHub Desktop.
If url contains HTTPS redirect to HTTP.
<?php
if ($_SERVER['HTTPS'] == "on") {
$url = "http://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
header("Location: $url");
exit;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment