Forum Discussion

Joe_Pipitone's avatar
Joe_Pipitone
Icon for Nimbostratus rankNimbostratus
Nov 09, 2010

Catch www and domain

I have an iRule that tries to catch both a uri as well as a hostname, however it doesn't seem to want to catch the www.domainname.com, it only catches it without the www.

I tried using a wildcard (*) in front of the domainname.com, however it just triggers an error.

Anyone know what I may be missing? Here's the rule:


when HTTP_REQUEST {

if {[HTTP::uri] starts_with "/presentations" } {

HTTP::redirect "http://someaddress.com/download.aspx"

} elseif {[string tolower [HTTP::host]] eq "domainname.com"}{

HTTP::redirect "http://someaddress.com/events/home.aspx"

}

}

Thanks