ChrisBlack_1713
Sep 23, 2014Nimbostratus
HTTP redirect not working
I have the following I rule that is working however it will not redirect uppercase /LIVELINK/LIVELINK.EXE Any ideas on how to get it to redirect both upper and lower case?
when HTTP_REQUEST {
parse the uri
switch -glob [string tolower [HTTP::uri]] {
*/livelink/livelink.exe* {
replace each instance of /livelink/livelink.exe with /OTCS/cs.exe in the uri
set replaceURI [string map [list /livelink/livelink.exe /OTCS/cs.exe] [HTTP::uri]]
construct the redirect
set cachecontrol {no-cache}
set pragma {no-cache}
set location "http://ContentServerQA.idexxi.com$replaceURI"
HTTP::respond 301 noserver "Location" $location "Cache-Control" $cachecontrol "Pragma" $pragma "Connection" "close"
}
}
}