gcaba_31903
Dec 08, 2011Nimbostratus
simple irule that does host redirect with wildcard
hi,
i'm in the process of retiring a domain and all websites behind it, so I need to redirect all of them to a new domain.
- so far I got this rule working, see code below,
when HTTP_REQUEST {
if {[HTTP::host] contains www.abc.com}
{HTTP::redirect "HTTP://www.cde.com[HTTP::uri]"}
elseif {[HTTP::host] equals "abc.com"}
{HTTP::redirect }
}
but given the amount of sites I would like to make more general and use a wild card
when HTTP_REQUEST {
if {[HTTP::host] contains *.abc.com}
{HTTP::redirect }
}
thanks,
but given the amount of sites I would like to make more general and use a wild card