Forum Discussion
DNG_23691
Nimbostratus
Aug 18, 2009Simple URI redirect not working
Newbie, super easy I thought, but not so I guess.
I have a pair running 9.3.1 and need to redirect to a pool based on the URL.
So, I have two pools, pool_old and pool_new.
If someone enters the URL www.example.com I want them to go to pool_old. If someone enters www.example.com/admin I want them to go to pool_new.
Here is the code I used:
when HTTP_REQUEST {
if { $uri starts_with "/admin" } {
pool pool_new
} else {
pool pool_old
}
}
Am I screwed up here? When I added the irule to the virtual server, it told me I needed a profile for the virtual server. I added the profile that was there (its called http). The profile doesn't seem to mess anything up but when I add the irule I cannot browse anywhere.
Thanks in advance.
- DNG_23691
Nimbostratus
That worked! Thanks.
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