Andrea_Arquint
Apr 15, 2010Nimbostratus
string substitution
Hi
I want to create an iRule which does the following:
when HTTP_REQUEST {
set host_orig [string tolower [HTTP::host]]
if { $host_orig contains ".gtm"} {
remove the string ".gtm" and return the modified "host" without the string ".gtm" in it
}
}
If I would request "www.gtm.mydom.com" then I will be redirected to www.mydom.com dynamically.
Even for example for:
test.gtm.mydom.com
www.gtm.otherdom.net
www.gtm.nextdom.org
asf
Why do I need this?
We use GTM's and our DNS provider does delegating everything "gtm.mydom.com" to both of our GTM's. So that's why "http://gtm.mydom.com can be resolved what we don't want.
Thanx for any help
:-)