Hien_Truong
May 26, 2021Cirrus
irule not redirect with wildcard.
when i try to redirect (wildcard) https://www.abc.com//index.cfm?ty=dir or https://www.abc.com//index.cfm?ty=fua, it is not redirect, do you know what happening with my irule? i appreciate your reply:
when HTTP_REQUEST {
if { [HTTP::host] equals "www.abc.com" }
{
switch -glob [HTTP::path]
{
"/index.cfm?ty=dir"
{ HTTP::respond 301 Location "https://cbs.com/redir-legacy/index.cfm?ty=dir"
}
"/index.cfm?ty=fua"
{ HTTP::respond 301 Location "https://cbs.com/redir-legacy/index.cfm?ty=fua"
}
"/"
{ HTTP::respond 301 Location "https://cbs.com/redir-legacy/"
}
default
return
}
}
}
Daniel,
you are correct, when I change to HTTP:uri, it works. Thanks a lot for your support.