Forum Discussion
Chris_Robert_10
Nimbostratus
Jan 22, 2009sub site iRule
I have been asked to help in a site redesign.
They want to have 12 sub sites go to one set of servers and everything else go to another set.
The URL must not change in the users browser.
So they want
www.mysite.com/site1/
www.mysite.com/site2/
www.mysite.com/site3/
......
www.mysite.com/site12/
To go to one set of servers and www.mysite.com/sitewhatever/ to go to another set of servers.
I currently have two separate pools and two separate virtual servers setup.
Everything I have tried has not produced what they want.
Anyone have any suggestion?
Thanks,
Chris
- hoolio
Cirrostratus
Hi Chris,when HTTP_REQUEST { Check the requested path switch -glob [HTTP::path] { "/site[1-9]/* - "/site1[1-2]/* { Request matched /site1/* - /site12/* so use first pool pool first_pool log local0. "[IP::client_addr]:[TCP::client_port]: Using first_pool for request to [HTTP::uri]" } default { Request didn't match so use second pool pool second_pool log local0. "[IP::client_addr]:[TCP::client_port]: Using second_pool for request to [HTTP::uri]" } } }
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