We are trying to do a redirect from / to /access/signin however with the following application rule we see too many redirects (looping) for HTTPS, HTTP is working fine.
acl TEST-RDR hdr_dom(Host) -i www.test.com
acl TEST-RDR path_beg /access/signin
http-request redirect location https://www.test.com code 301 if TEST-RDR
Any advice or pointers would be really helpful, I am new to Application rules and trying to convert an F5 iRule (below)
when HTTP_REQUEST {
set host_info [string tolower [HTTP::host]]
set uri_info [string tolower [HTTP::uri]]
switch -glob $host_info {
"www.test.com" {
switch -glob $uri_info {
"/access/signin*" {
HTTP::respond 301 Location "https://www.test.com"
}
"/*" {
HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]"
}
}
}
"*.test.com" {
switch -glob $uri_info {
"/access/signin*" {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
}
}
}