One more adjustment to fix redirect issue where https requests are redirected to http.  Adjusted location search order so that our redirect URL was not picked every time.