Forum Discussion
jch125_41641
Nimbostratus
Oct 26, 2010Referrer from email links
We have a partner that we host a site for and we are applying an iRule that will redirect requests unless the referrer is explicity allowed. Here is the current iRule and it works like I expect it would.
when HTTP_REQUEST {
switch -glob [string tolower [string trim [URI::host [HTTP::header Referer]]]] {
"*ReferA.com" -
"*ReferB.com" -
"*ReferC.com" -
"" {
pool example1.com
}
default {
Send all other requests to XXX page
HTTP::redirect "example2.com"
}
}
}
It has now been brought to our attention that whenever this partner sends out email campaigns with links to the example1.com site, the referrer ends up being Live.blahblahblah.com (or similar behavior for Gmail or other web-based email clients) and gets sent to the default page (example2.com).
Any suggestions what I can do to handle these types of referrers or another string to match on in the HTTP_Request?
Thanks,
John
3 Replies
Sort By
- hoolio
Cirrostratus
Hi John, - jch125_41641
Nimbostratus
Aaron, - hoolio
Cirrostratus
Hi John,when HTTP_REQUEST { switch -glob [string tolower [string trim [URI::host [HTTP::header Referer]]]] { "*ReferA.com" - "*ReferB.com" - "*ReferC.com" { Do nothing. The action will be to use the VS's default pool } default { No host match. Check the requested URI to see if it's a whitelisted URI switch -glob [HTTP::uri] { "*/batch_email_uri_1/*" - "*/batch_email_uri_2/*" { Do nothing. The action will be to use the VS's default pool } default { Send all other requests to XXX page HTTP::redirect "example2.com" } } } } }
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