Forum Discussion
Robert_47833
Aug 14, 2011Altostratus
Hi,all friends,I use irule below to achieve this:
switch -glob [string tolower [HTTP::host]] {
"srwd29.com" -
"www.srwd29.com" {
scan [HTTP::host] {%[^.]%s} domainfirst domainleft
set num 2
HTTP::redirect "http://$domainfirst$num$domainleft[HTTP::uri]"
}
I try to add "2" after $domainfirst( HTTP::redirect "http://$domainfirst2$domainleft[HTTP::uri]"),but it doesn't work ,that is why there is a num variable
Thank you for your great help