Hello,
I am trying to take a URL which is entered into the browser and then use strpos to redirect to specific pages based on the referrer.
The idea is that anyone typing "blue" or some derivative thereof into the browser is redirected to bluepage.html and all other visitors are redirected to otherpage.html
However, everyone is redirected to otherpage.html, including those who type "blue" into the browser.
Why? Thanks!
<?php
$ref = $_SERVER['HTTP_REFERER']; # have also tried HTTP_POST
if (strpos($ref, "blue"))
{
header('Location: bluepage.html');
exit; # have also tried without the 'exit;'
}
require('otherpage.html');
?>