2
   

Referrer script

 
 
Reply Tue 27 Apr, 2004 05:47 am
Hi ppl,

I have a bit of an urgent study to do and wonder if anyone can help me with some scripting i need for a project, the below should explain the technical site, but i will give a bit more of a background to it

If referrer = X then redirect to URL Y
If referrer not equal X then redirect to URL Z


The purpose of the above is to have a refarray from www.google.com to redirect to URL Y, however if the refarray is from any other site then the redirect URL should go to Z.

I already have some information on how to redirect but would greatly appreciate anyones help Cool

Thanks

Thomas Question
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 2 • Views: 1,838 • Replies: 5
No top replies

 
Craven de Kere
 
  1  
Reply Tue 27 Apr, 2004 09:28 am
http://search.able2know.com/Web_Development/Scripts/JavaScript/Navigation/Javascript_redirect_based_on_refferer_L11/

Just specify one referrer in the array and you have it right there in JavaScript.
0 Replies
 
octopushelpdesk
 
  1  
Reply Tue 27 Apr, 2004 10:12 am
Hi Craven,

Thanks for the below, however i am not sure if this works correctly;

I have specified one referrer in the array www.google.com - if visitor comes from here - redirection occurs to www.google.be

However i now also want a referrer that states that if visitor is from any other .com - redirection occurs to www.google.fr

Any ideas on this... (it is a puzzling one as i am not specifying the 'if else' domain.

Thanks

Thomas Question
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 27 Apr, 2004 10:37 am
Just put that on the "else" page. Then specify the two redirects and if they come from one, redirect, if they come from another, redirect, if they come from neither, they stay on the page.

Use the ansense of redirection as the "else if".

If there's some reason that it actually needs to redirect on the else if let me know.
0 Replies
 
octopushelpdesk
 
  1  
Reply Wed 28 Apr, 2004 06:19 am
Hi Craven,

Wel that is the whole thing where i am going wrong at this point, i can not seem to get it working (i am sure it is me overlooking something) if the user is coming from any other .com redirect to www.google.fr how do i write this in the script. Everything i do seems to have the need to specify the if else and then the domain, but what if there is not domain and it is open to any .com??
Any advise....

Thanks

Thomas Question
0 Replies
 
Craven de Kere
 
  1  
Reply Wed 28 Apr, 2004 09:22 am
Please clarify your post.
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Referrer script
Copyright © 2025 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 01/16/2025 at 06:00:00