Forum Discussion
KD_48848
Nimbostratus
Oct 02, 2008http referer usage in iRule
Hi,
Need a configuration sample where we can compare that if the http referrer for a particular site is NULL then redirect to a particular location.
The link to be comp...
Oct 02, 2008
This should do it for you (or something similar).
when HTTP_REQUEST {
if { ![HTTP::header exists "Referer"] } {
switch -glob [HTTP::uri] {
"/xyz*" {
HTTP::redirect "http://www.abc.com/pqr"
}
"/abc*" {
HTTP::redirect "http://www.abc.com/def"
}
}
}
}
Notice Referer is spelled wrong in the RFC so don't type in "Referrer" or it will never pass.
-Joe
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