Jump to content

talbot_brian

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

talbot_brian's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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'); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.