Forum Discussion
Feb 24, 2021
I think two if matching cause this. Can you try this?
when HTTP_REQUEST {
if { [HTTP::host] equals "test.abc.com" } {
#log local0. "Host [HTTP::host] --> URI [HTTP::uri] --> Redirected"
if { [HTTP::uri] starts_with "/IAM/" } {
HTTP::respond 307 Location "https://site1.company.com[string map {/IAM/ /IAM2/} [HTTP::uri]]"
return
}
else {
HTTP::respond 307 Location "http://site2.company.com[HTTP::uri]"
return
}
}
}
- ant77Feb 24, 2021Cirrostratus
Enes Afsin Al, Thank you so much! I will try tonight and let you know...