Skip to content

Instantly share code, notes, and snippets.

@Danilovonline
Created August 20, 2014 06:40
Show Gist options
  • Save Danilovonline/2b0d724fc3d30d3f77f9 to your computer and use it in GitHub Desktop.
Save Danilovonline/2b0d724fc3d30d3f77f9 to your computer and use it in GitHub Desktop.
$protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
header("location:{$protocol}://_:_@{$_SERVER['SERVER_NAME']}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment