Forum Discussion
JeffRay_129268
Nov 22, 2015Nimbostratus
I have now changed and tried this and with english or french any language when selected, loop has stopped as you expected that is good but it terminates on first request i.e client is redirected to http(s)://(www).mylocalnet.us and no URI is added.
Browser Debug output:
http://mylocalnet.us/ HTTP GET 301
https://www.mylocalnet.us/ HTTPS (Aborted)
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] equals "/atd/atd.xml" } {
HTTP::respond 301 "Location" "https://atd.mylocalnet.us/atd/atd.xml"
} elseif { ![HTTP::path] starts_with "/fr" && !([HTTP::header "Accept-Language"] starts_with "fr") } {
HTTP::redirect "https://www.mylocalnet.us/fr/pages/default.aspx"
} elseif { [string tolower [HTTP::path]] equals "/" } {
HTTP::redirect "https://www.mylocalnet.us/en/pages/default.aspx"
}
}