Skip to content

Instantly share code, notes, and snippets.

@otuva
Created June 19, 2024 22:11
Show Gist options
  • Save otuva/2b065ffe67861b7eca03937c5ffb71ec to your computer and use it in GitHub Desktop.
Save otuva/2b065ffe67861b7eca03937c5ffb71ec to your computer and use it in GitHub Desktop.
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/example/');
exit;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment