Mukund_125243
Aug 15, 2013Nimbostratus
HTTP::redirect restrictions?
Hi,
Im trying to redirect all requests from an IP to a specific page, to a completely new URL. The redirect works but it always goes to our base domain no matter what I specify as redirect target. IRule would probably explain the situation better
Lets say the page abc.php is on 'some-host.my-site.com'(some-host.my-site.com/abc.php), the Irule below only redirects to my-site.com, regardless of the fact I asked it to go to google.com instead. Any input would be helpful
The plan was to apply this to only the virtual server for 'some-host' since this rule should not apply to any other host behind the domain
when HTTP_REQUEST {
set http_path [HTTP::uri]
if {$http_path contains "/abc.php" } {
if {[IP::addr [IP::client_addr] equals xx.xx.xx.xx]}{
use pool some-host
}
else {
HTTP::redirect "www.google.com"
}
}
}