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 compared for http referrer and the link to which it should be redirected has the same http host but different http URI.
eg: If http referrer is Null for "www.abc.com/xyz" then redirect to "www.abc.com/pqr".
How do we accomplish this ?
Thanks in advance for your help.
Thanks,
KD.
- 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" } } } }
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