Forum Discussion
PSritaC
Feb 19, 2020Altostratus
Hello
I have a similar issue - where the redirection should retain path after the second location.
when HTTP_REQUEST {
# Do redirects.
if { ([string tolower [HTTP::host]] equals "abcshare") and ([HTTP::uri] starts_with "/site/app") } {
HTTP::respond 301 Location "https://app.abcshare.com[HTTP::uri]"
}
elseif { [string tolower [HTTP::host]] equals "abcshare" and ([HTTP::uri] starts_with "/") } {
HTTP::respond 301 Location "https://abcshare.com/"
}
}