Forum Discussion
Kalpesh_48932
Feb 13, 2012Nimbostratus
Http_referrer in iRule
Can anyone tell me how to use HTTP_Referrer in iRule...?
I have my current rule is
when HTTP_REQUEST { if {[active_members [LB:erver pool]] < 1} { HTTP::redirect "http://dev-sorry...
nitass
Feb 20, 2012Employee
i do not think HTTP Referer is applicable.
this is an example of the second one.
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b pool foo list
pool foo {
monitor all fake
members 200.200.200.101:80 {}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[active_members [LB::server pool]] < 1}{
HTTP::redirect "http://dns2.com/?origin=http://[HTTP::host][HTTP::uri]"
}
}
}
[root@ve1023:Active] config b pool foo|grep -i pool\ member
+-> POOL MEMBER foo/200.200.200.101:80 inactive,down
[root@ve1023:Active] config curl -I http://dns1.com/whatever
HTTP/1.0 302 Found
Location: http://dns2.com/?origin=http://dns1.com/whatever
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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