Forum Discussion
spirit2rock_322
Nimbostratus
Nov 30, 2009ReDirect WITH Referer
We use One Irule (IP) to Redirect multiple web sites, possibly not behind the F5. This works well but there is no Referer. The site owners want to know how many people are going to AdvertisedSite.com to get to MainSite.com/Advertised.
when HTTP_REQUEST {
if { [HTTP::host] contains "mainsite.com" } {
HTTP::redirect "http://www.redirectedsite.com/health/signup.aspx?30587"
Also Tried - totaly fails.
} elseif { [HTTP::host] contains "JoeHost.com" } {
HTTP::header replace referer "JoeHost.com"
HTTP::header replace Host "www.redirectsite2.com"
HTTP::uri "/ph/west/network.shtml"
} else {
HTTP::respond 404 content "404 Not FoundThe requested URL was not found on this server."
2 Replies
- The_Bhattman
Nimbostratus
Have a look at the following Article
http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=66
I hope this helps
Bhattman - hoolio
Cirrostratus
You can't force the client to send a specific Referer header value in a subsequent request. The browser may (and most do) elect to set the Referer header to the prior URI which triggered the current request.
As CB suggested, another option might be recording stats on LTM itself to provide to the site owners.
Or you could try rewriting the hostname and/or URI instead of redirecting the client. This assumes that you're willing and able to proxy requests from the client to the www.redirectsite2.com web app.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
