Forum Discussion
Brad_Parker
Cirrus
For a permanent redirect you would use this to do a 301:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "www.abc.com" and [string tolower [HTTP::uri]] starts_with "/app/" } {
HTTP::respond 301 noserver Location "https://app.def.com/[string map {/app/ /} [string tolower [HTTP::uri]]]"
}
}
Brad_Parker
Sep 23, 2015Cirrus
You probably want to add string tolower to prevent case mis-match compares. I update above.