Good all the time of day.

There is a site that is entered into the browser line, say, , then the browser jumps to .

How, having a url, to determine which page is thrown by the user when entering on ODA. page?

  1. $url_s; // from here we take url
  2. $url_f; // hunt here to put the value of the address after the redirect

    2 answers 2

    You can use JavaScript to monitor location.href and pass the value using the AJAX PHP script. And directly through PHP to implement it IMHO

       <?php @header('Refresh: 3; URL='); echo 'Через 3 сек. вы будете перенаправлены на новую страницу.'; exit; ?> 

      I still did this, once there was a need:

      Request for a page

       <?php switch ($_REQUEST['CITY']) { case 1: $url = ""; break; default: // Если другое значение $url = ""; } header('Location: ' . $url); exit; ?>