Forum Discussion
Rajeev_Kanzinga
Nimbostratus
Feb 21, 2016irule creation with tmsh using switch option
Hi can any one tell me what wrong in this irule creation?
create ltm rule /Common/myrule when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] {"xyz-external-fin.test.com" { pool xyz-e...
arpydays
Nimbostratus
Feb 21, 2016I'm not sure you can put in a 1 liner rule like this and may need to drop to editor mode and paste in. You could also try putting this in via bash, note you need a space before default in your rule.
[root@f51:Active:Standalone] config tmsh create ltm rule /Common/myrule when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] {"xyz-external-fin.test.com" { pool xyz-external-fin } "xyz-external-prj.test.com" { pool xyz-external-prj } default { discard } } }
[root@f51:Active:Standalone] config tmsh list ltm rule myrule
ltm rule myrule {
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] {xyz-external-fin.test.com { pool xyz-external-fin } xyz-external-prj.test.com { pool xyz-external-prj } default { discard } } }
}
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