Jeremy_C_Russel
Nimbostratus
Nov 14, 2011Possible issue with an iRule
Greetings all.
I wanted to get some eyes on this particular rule I've setup. The premise is to take urls in the form of http://string.domain.com or http://www.string.domain.com, capture "string" and redirect to a new url, http://www.domain.com/SomeURI?a= where we append the captured string.
I've tested this and it works fine, but for some folks its errors.. in IE, is give them a 404 and in Firefox, it's complaining of a "Connection Reset".
I can't see anything as to why this would be caused.
if { [regexp {www} [HTTP::host]] } {
scan [HTTP::host] {%[^.].%[^.].%s} www host dom
} else {
scan [HTTP::host] {%[^.].%s} host dom
}
if { not [regexp {domain|www|wsecure|ssl} $host] } {
log local0. "Caught a MS host $host, redirecting..."
HTTP::redirect "https://www.domain.com/MS/RedirectMS?site=hub&value=$host"
}