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 wo...
hoolio
Cirrostratus
Nov 01, 2010Hi John,
Within the default switch case, you could add a check for the URI token that is unique to the batch email links. If there is just one token, you could use an 'if' check. If there are more than a couple of links, you could use another switch case:
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"
}
}
}
}
}
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
