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 the length function for the http::referrer?
3 Replies
- jquinones82_469
Nimbostratus
AS ALWAYS THANKS IN ADVANCE - hoolio
Cirrostratus
I 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 - jquinones82_469
Nimbostratus
Thanks Aaron, I will give this a shot and let you know how it goes
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
