Forum Discussion
vrajan_97076
Nimbostratus
Sep 12, 2007How to get the URL of the referrer page?
Hi,
How do we get the URL of the referrer page using iRules?
Like in asp, we can use either the Request.ServerVariables("HTTP_REFERER") or document.referrer for the same. Is there an eq...
Sep 13, 2007
The only problem I see is the embedded quotes in your string. You can either escape them with backslashes "...\"..." or use single quotes which will work with javascript as well. You can also simplify it a bit to elimiate the else clause though.
This should work for you:
when HTTP_REQUEST
{
if { ! ([string tolower [HTTP::header value Referer]] contains "abc.def.com") } {
HTTP::respond 200 content " "
}
}-Joe
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
