Forum Discussion

DNG_23691's avatar
DNG_23691
Icon for Nimbostratus rankNimbostratus
Aug 18, 2009

Simple 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.