Forum Discussion
slesh_219299
Dec 23, 2016Cirrus
i found something like that but can someone help me with this and confirm it is ok or correct it please ? 🙂
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"abcwebsite.com" {
HTTP::respond 301 Location "http://abcwebsite.com[HTTP::uri]"
}
"äbcwebsite.com" {
HTTP::respond 301 Location "http://äbcwebsite.com[HTTP::uri]"
}
"abcwebsite.new.com" {
HTTP::respond 301 Location "https://abcwebsite.new.com[HTTP::uri]"
}
}
}
2nd one ******************************************
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "abcwebsite.com" } {
HTTP::respond 301 Location "http://abcwebsite.com[HTTP::uri]"
} elseif { [string tolower [HTTP::host]] equals "äbcwebsite.com" } {
HTTP::respond 301 Location "http://äbcwebsite.com[HTTP::uri]"
} else {
HTTP::redirect https://[HTTP::host][HTTP::uri]"
}
}