Skip to content

Instantly share code, notes, and snippets.

@EmreKara5aya
Last active August 16, 2017 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EmreKara5aya/61678e9b001e6f8b64ea1620ed9e5f2d to your computer and use it in GitHub Desktop.
Save EmreKara5aya/61678e9b001e6f8b64ea1620ed9e5f2d to your computer and use it in GitHub Desktop.
if(($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "on"){
$redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $redirect);
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment