Forum Discussion
Amanda_68359
Nimbostratus
Jun 11, 2014Help on a irule
Hello Everybody, i'm a newbie in irules and need some help in order to change an old irule to something simple and i'm don't know if i'm doing it right.
Original Irule ( when i put up on V11 i g...
Kevin_Davies_40
Nacreous
Jun 11, 2014when HTTP_REQUEST {
if { [class match [string tolower [HTTP::host]] contains mysites] } {
HTTP::redirect [class match -value [string tolower [HTTP::host]] contains mysites]
}
}
With string class "myclass" as follows
Key Value
sitea.test.com http://sitec.test.com/index
siteb.test.com http://test3.test.com/test
sitec.test.com http://test3.test.com/login
- Kevin_Davies_40Jun 11, 2014
Nacreous
This gives you a simple iRule using data classes which means you can remove or add sites as you please and the iRule will automatically use them. The data class is always first match. - Amanda_68359Jun 12, 2014
Nimbostratus
Thanks for the tip! I will test it right away!
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