Hien_Truong
Sep 03, 2020Cirrus
Redirect all under the part of uri
Hi,
i have trouble to redirect " * " under part of uri. The below is one redirect:
https://www.abc.com/defe/* redirect to https://sample.com/redirect-to-legacy/new-defe/*
Below is my irule it works but it not redirect as expect, do you know how to redirect it?
when HTTP_REQUEST {
if { [HTTP::host] equals "www.abc.com" }
{
switch -glob [HTTP::path]
{
"/defe/*"
{
HTTP::respond 301 Location "https://sample.com/redirect-to-legacy/new-defe/*"
}
}
}
}