irule to redirect and amend URI
Hi
I'm trying to write a redirect irule but not having much joy.
The irule firstly needs to identify wireless clients then direct them to poolA
Then it needs to identify internal clients and direct them to poolB, but whilst redirecting to poolB also needs to check if the uri starts with / and ammend to /newuri
All external clients should go to poolA
The default resource on the VS is poolA.
We have a data group called Wireless with all relavant subnets identified.
What I have so far is:
when HTTP_REQUEST {
if { [matchclass [IP::remote_addr] equals $::Wireless] } {
pool PoolA
} elseif { [IP::addr [IP::client_addr]/16 equals 192.168.0.0] } {
pool poolB
}
}
This works well, I also have the following irule:
when HTTP_REQUEST {
if {[HTTP::uri] == "/"}{
HTTP::redirect "/newuri"
}
}
Which will happly replace the uri, what I need is the two combined but URI rewriting only for internal clients only.