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, 04: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: 4
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 07:36 PM.

Reply With Quote
  #2  
Old April 1st, 2006, 03: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, 03: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: 4
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, 06: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 55 m 49 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, 06: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: 4
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 06:39 AM.

Reply With Quote
  #6  
Old April 6th, 2006, 06: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: 4
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



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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





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