Forum Discussion

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

Catching variants of domain - only catching first

I have an irule that catches a variant of a domain - we'll call it domainG.com. It then redirects if the uri "presentations" is entered in by the client.

If "presentations" is not found, it redirects to the default.

I've added another variant by means of using the following in my iRule, however it only seems to want to catch domainG.com, and not domainH.com when "presentations" is found. The iRule is redirecting to the default just fine, but it is not catching "domainH.com/presentations" Can anyone tell me what I may be missing?

when HTTP_REQUEST {

switch -glob [string tolower [HTTP::host]] {

"*domainG.com" - "*domainH.com" {

switch -glob [string tolower [HTTP::uri]] {

"/presentations*" {

HTTP::redirect "http://subdomain.domain.com/events/some-url-2010/some-page.aspx"

}

default {

HTTP::redirect "http://subdomain.domain.com/url2/some-other-page/home.aspx"

}

}

}

}

}

1 Reply

  • Please disregard this post, the iRule works perfectly, I just didn't have the other domain pointed to the correct VIP ;-)