Hi All, I am tryin gto do the following and am having fiddiculty getting it to work.
I want a specific URL lets say http://sitea.com to redirect to a specific path on a web-server that is behind a virtual server, so VirtualServer.com is for sale - Premium Domain but I want users that go to http://virtualserver.com to not be redirect to this page. I have an alias in dns to point sitea.com to the virtual server. The irule I tried looks like this
when HTTP_REQUEST {
if { [HTTP::host] equals “serviceportal.intdata.com ” }{
HTTP::redirect “http://sbm/tmtrack/tmtrack.dll?shell=srpcatalog ”
}
}
Thanks
nathe
June 6, 2012, 12:16pm
2
pvaughan,
You don’t actually say what is going wrong with your iRule.
Anyway, does this work for you?
when HTTP_REQUEST {
if { ([HTTP::host] eq “sitea.com ”){ {
HTTP::header replace “Host” “virtualserver.com ”
HTTP::uri “/tmtrack/tmtrack.dll?shell=srp”
}
}
Hope this helps,
N
nathe
June 6, 2012, 12:21pm
3
Oops, brace the wrong way round on line 2. Sorry.
Should be:
when HTTP_REQUEST {
if { ([HTTP::host] eq “sitea.com ”)} {
HTTP::header replace “Host” “virtualserver.com ”
HTTP::uri “/tmtrack/tmtrack.dll?shell=srp”
}
}
N
That doesnt seem to work if the irule is in place or not I keep getting redirect to realserver/tmtrack/tmtrack.dll? not virtualserver/tmtrack/tmtrack.dll?shell=srp, its fine if the realserver comes up in the browser I just need it to point to /tmtrack/tmtrack.dll?shell=srp