Bob_10976
Mar 25, 2010Nimbostratus
Rewrite rule not working, what am I missing?
I have this iRule that works fine, with the exception of the last entry, which I can't seem to get to take. This is assiged to our MOSS farm, so we have several web sites under one pool. I added the log entries to see if the rule was even being hit and i'm not seeing anything in the LTM's log files.
Any suggestions would be greatly appreciated.
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] equals "domain1.com") || ([string tolower [HTTP::host]] equals "www.domain1.com") } {
HTTP::respond 301 Location http://domain2.com
}
elseif { ([string tolower [HTTP::host]] equals "domain3.com") || ([string tolower [HTTP::host]] equals "www.domain3.com")} {
HTTP::respond 301 Location https://domain3-edit.com
}
elseif { ([string tolower [HTTP::host]] equals "www.domain4.com") } {
HTTP::respond 301 Location http://domain4.com/
}
elseif { ([string tolower [HTTP::host]] equals "domain5.com") } {
HTTP::respond 301 Location https://domain5-edit.com/
}
elseif { ([string tolower [HTTP::host]] equals "www.domain6.com") } {
HTTP::respond 301 Location http://domain6.com/
}
elseif { ([string tolower [HTTP::host]] equals "www.domain7.com") } {
HTTP::respond 301 Location http://domain7.com/
}
elseif { ([string tolower [HTTP::host]] equals "domain7.com/security") } {
log local0. "Host before: [HTTP::host]"
HTTP::respond 301 Location http://domain7.com/ciso/pages/services.aspx
log local0. "Host after: [HTTP::host]" }
}
Thanks,
Bob