Forum Discussion
AlfaSpider_3544
May 04, 2012Nimbostratus
irule for virtual server to redirect to different pool
Well.....This doesn't work. Any help would be much appreatiated.
when HTTP_REQUEST {
if { [HTTP::uri] contains "mywebsite.com/util" } {
pool my-util-pool
} }
}
- hooleylistCirrostratusHi,
when CLIENT_ACCEPTED { Save the name of the VS default pool set default_pool [LB::server pool] } when HTTP_REQUEST { switch -glob [string tolower [HTTP::host][HTTP::path]] { "*mywebsite.com/util*" { "*seattle.gov/util*" } { pool spu-util-pool } default { pool $default_pool } } }
- AlfaSpider_3544NimbostratusGetting error when trying to update.
- hooleylistCirrostratus[LB::server pool] will return the default pool on the virtual server, so you don't need to update the name or hardcode the pool name in the iRule. Just set spu-util-pool to the name of the pool you want to use for the matching requests.
- AlfaSpider_3544NimbostratusI'm sorry for so many questions....I'm an irule dummy.
- hooleylistCirrostratusNo worries. Try exactly this:
when CLIENT_ACCEPTED { Save the name of the VS default pool set default_pool [LB::server pool] } when HTTP_REQUEST { switch -glob "[string tolower [HTTP::host][HTTP::path]]" { "*seattle.gov/util*" { pool spu-util-pool } default { pool $default_pool } } }
- AlfaSpider_3544NimbostratusI am so close..................I only get one error when I try to update.
- hooleylistCirrostratusSorry, I had a typo in the iRule above. I edited the post to fix it.
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