Should’nt the following give an error message? It sends me to domain.com/asdad/ instead of giving me an error message.
<?php
echo 'asdadasdasd';
if ($_SERVER['REQUEST_URI'] == '/newtest.php') {
header("Location: /asdad/");
exit;
}
?>
I view this directly, no other files or code before or after this. Should’nt header give me an error and NOT send me to the new page as I have output before the header?
Check your
phpinfo(), you probably haveoutput_bufferingswitched on.