22-Nov-2022 08:00
Hello ,
I am working on a redirect request using an iRULE
User has requested the following redirect,
https://abc.xyz.com/Projectsite/* to redirect to https://bbb.xyz.com/page/projectdocs-users/
Can we do an irule with Wildcard in the path. ?
Appreciate your help..
Solved! Go to Solution.
22-Nov-2022 09:55
Hi @vinod1 ,
you can do it without wildcard in uri , it is sufficient to use "starts_with" operator.
Please check this :
when HTTP_REQUEST {
if { [HTTP::host] equals "abc.xyz.com" && [HTTP::uri] starts_with "/Projectsite/"}{
HTTP::redirect "https://bbb.xyz.com/page/projectdocs-users/"
}
}
I hope it fits with your requirements
Regards
22-Nov-2022 09:55
Hi @vinod1 ,
you can do it without wildcard in uri , it is sufficient to use "starts_with" operator.
Please check this :
when HTTP_REQUEST {
if { [HTTP::host] equals "abc.xyz.com" && [HTTP::uri] starts_with "/Projectsite/"}{
HTTP::redirect "https://bbb.xyz.com/page/projectdocs-users/"
}
}
I hope it fits with your requirements
Regards
22-Nov-2022 11:48
Thankyou very much Mohamed, it worked..
You saved lot of time..
Appreciate your help.
22-Nov-2022 12:02
28-Nov-2022 19:58
Glad it worked! I marked it as the Accepted Solution, so anyone looking to solve the same issue in the future can easily find the answer.