Forum Discussion
jquinones82_469
Nimbostratus
Oct 20, 2010how do you check for a null http referer
I want to check for a blank http referer for an IRULE
([HTTP::header "Referer"] equals $null)
is there some type of variable or way to check for this?
Would I have to use...
hoolio
Cirrostratus
Oct 20, 2010I think [HTTP::header $header_name] will return a null string even if the header doesn't exist, so you could combine that with a check to see if the header exists:
if {[HTTP::header exists Referer] && [HTTP::header Referer] eq ""}{
Or if you just want to check that it's not null you could use:
if {[HTTP::header Referer] ne ""}{
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
