when the url is localhost/school/portfolio/contact.php it works fine, but when I use a get parameter index.php?page=contact it redirects to index.php
The code I use
$url = "http". ((!empty($_SERVER['HTTPS'])) ? "s" : "") . "://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
header('Location: '.$url."?sent=yes");
What do I have to add?