Forum Discussion
Stephane_Viau
Mar 06, 2017Nimbostratus
Randy, can you show what your iRule looks like? Only advice I have for now is to use HTTP::path for the condition because HTTP::uri also contains the query string so depending on how you built your condition, you might get unexpected results.
So I would do something like this (note that I added [HTTP::uri] in both redirects in case you need to keep the query string) :
if { ([HTTP::path] eq "" ) or ([HTTP::path] eq "/")} {
HTTP::respond 301 Location http://server.company3.com[HTTP::uri]
}
else {
HTTP::respond 301 Location http://server.company2.com[HTTP::uri]
}