ReDirect 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.”

Have a look at the following Article

http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=66

I hope this helps

Bhattman

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