Forum Discussion
SSHSSH_97332
May 18, 2012Nimbostratus
ASM IRule to associate to a Class
i want to check sourec IP of a client , if it is X.X.X.X then assign HTTP Class X , else assign HTTP Class Y . what is the needed IRule ?
nathe
May 19, 2012Cirrocumulus
SSHSSH,
I must admit I did think you can, although I've never tried or tested this. This is the iRule I came up with but after reading George's post my instincts tell me I must be wrong - as I'm nowhere near his level of expertise. Anyway, apologies in advance if I'm wrong but here goes:
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals x.x.x.x] } {
HTTP::class select httpclassx
} else {
HTTP::class select httpclassy
}
}
If you check out the http::class wiki here: https://devcentral.f5.com/wiki/iRules.http__class.ashx it says "Note: the HTTP class must already be configured on the virtual server"
Be great to get feedback if it works, or find out where I've gone wrong....especially as I'm contradicting a Devcentral Teamer.
Rgds
N
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