SEO Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   SEO Chat ForumsOtherSEO Scripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread SEO Chat Forums Sponsor:
  #1  
Old March 29th, 2006, 05:26 AM
MrLeroy's Avatar
MrLeroy MrLeroy is offline
Since 1984
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Location: Hastings, South East UK
Posts: 356 MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level)MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level)MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 Days 20 h 7 m 28 sec
Reputation Power: 3
Send a message via MSN to MrLeroy
"http_referer"

Heya,

Im not too hot on asp, but If I wanted to redirect a visitor to a different page depending on where they came from, is this possible? heres an example:

- There is a link to my site index on an DMOZ editors profile.
- I want to redirect anyone that click through to my site from that page to a different page i.e. Not the index
- Could I use request.servervariables("http_referer") along with some if/else statements to push that visitor elsewhere?

Any assistance on this would be gravy

Last edited by MrLeroy : March 31st, 2006 at 08:36 PM.

Reply With Quote
  #2  
Old April 1st, 2006, 04:59 PM
dws_Dan dws_Dan is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 121 dws_Dan User rank is Private First Class (20 - 50 Reputation Level)dws_Dan User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 14 h 24 m 56 sec
Reputation Power: 4
yes it can be done, i, however, dont know ASP so i cant give an example or guide you. Can help if you will settle for PHP

Reply With Quote
  #3  
Old April 3rd, 2006, 04:50 AM
MrLeroy's Avatar
MrLeroy MrLeroy is offline
Since 1984
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Location: Hastings, South East UK
Posts: 356 MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level)MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level)MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 Days 20 h 7 m 28 sec
Reputation Power: 3
Send a message via MSN to MrLeroy
Quote:
Originally Posted by dws_Dan
yes it can be done, i, however, dont know ASP so i cant give an example or guide you. Can help if you will settle for PHP

Ill settle for PhP

Reply With Quote
  #4  
Old April 4th, 2006, 07:17 AM
donkeyderby donkeyderby is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 24 donkeyderby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 46 m 57 sec
Reputation Power: 0
Here ya go...

Code:
<%
Dim sReferrer    ' URI of referrer you want to catch
Dim sRedirectTo  ' URI of page to redirect to

sReferrer = "http://whatever...etc"
sRedirectTo = "/redirect_here.html"
 
If Request.ServerVariables("HTTP_REFERER") = sReferrer Then
    Response.Redirect(sRedirectTo)
End If
%>

Unfortunately this will not always work as some security applications (Norton for example) remove this "private" header information... Nothing you can do to get around that I'm afraid.

Does it bug anyone else that they spelled referrer wrong?

Reply With Quote
  #5  
Old April 4th, 2006, 07:22 AM
MrLeroy's Avatar
MrLeroy MrLeroy is offline
Since 1984
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Location: Hastings, South East UK
Posts: 356 MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level)MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level)MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 Days 20 h 7 m 28 sec
Reputation Power: 3
Send a message via MSN to MrLeroy
Code:
If Request.ServerVariables("HTTP_REFERER") = sReferrer Then
    Response.Redirect(sRedirectTo)
End If
%>

Should referer be spelt right there? (where i marked it red) EDITS: OH MY GOD! I cant even spell it!!! Ignore that!

Also, Im guessing where you put 'sReferrer' and '(sRedirectTo)' i need to swap those for valid URLs? EDITS: Ignore this too, the penny just dropped

If say I wanted to redirect 2 referrer pages, how would I go about it?
Quote:
Originally Posted by donkeyderby
Does it bug anyone else that they spelled referrer wrong?

Yes, cos it doesnt half make life confusing!

Last edited by MrLeroy : April 4th, 2006 at 07:39 AM.

Reply With Quote
  #6  
Old April 6th, 2006, 07:37 AM
MrLeroy's Avatar
MrLeroy MrLeroy is offline
Since 1984
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Location: Hastings, South East UK
Posts: 356 MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level)MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level)MrLeroy User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 Days 20 h 7 m 28 sec
Reputation Power: 3
Send a message via MSN to MrLeroy
Excellent, I have got it working now time to cause some mischief


Thanks ooodles, if anyone can answer my second question about multiple URL redirects please do.

Thanks again

Reply With Quote
Reply

Viewing: SEO Chat ForumsOtherSEO Scripts > "http_referer"


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT