I have it halfway working now. IS there a way to add another host name to the above irule?
The redirect works when entering example in the browser, but i also need to add "sample" as well. Would the following work? When i put sample in the url i get an iis page and not redirected to newserver.
when HTTP_REQUEST {
if { [HTTP::host] contains "example" or "sample" } {
HTTP::redirect "http://newserver[HTTP::uri]"
}
}
when HTTP_REQUEST {
if { [HTTP::host] contains "example" or "sample" } {
HTTP::redirect "http://newserver[HTTP::uri]"
}
}