I have a .shtml file that calls php code using the
<!--#include virtual='/blahblah.php' --> directive. However, I need to call a simple php script before the headers are sent to test for a cookie or not - if a cookie is present I need to redirect to another script.
index1.shtml file...
<!--#include virtual='/test.php' -->
test.php:
<?php
if ($_COOKIE['text']) { /
header("Location: /index2.shtml");
exit;
}
?>
The problem is is that the header isn't redirecting, nor the exit command, even though the if() code is equating (tested with an echo "hello world"😉
Whatgives?