?
Solved

URL redirection by referer

Posted on 2000-03-04
2
Medium Priority
?
174 Views
Last Modified: 2011-09-20
I want to make a user go to one page if the referer is one site, and a different page if the referer is a different site or if there is no referer.

Thanks
0
Comment
Question by:TAF2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
maxkir earned 300 total points
ID: 2584674
It could be your  page that performs redirect:

<?php

if (strstr($HTTP_REFERER, $one_url) != false )
{
    Header("Location: $first_redirect_url");
    exit();
}
else
{
   // No referer or referer is not $one_url
    Header("Location: $another_redirect_url");
}
?>
0
 

Author Comment

by:TAF2000
ID: 2586080
Thanks..

Thats exactly what I was looking for, but now I realize I was looking for the wrong thing..

Here's the problem...I have 2 domains pointing to the same website, can I make each go to a different website using PHP?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question