Forum Discussion
ChrisBlack_1713
Nimbostratus
Sep 23, 2014HTTP 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 {
pa...
mimlo_61970
Cumulonimbus
Sep 23, 2014Yep, that worked. Try this:
when HTTP_REQUEST {
set myuri [string tolower [HTTP::uri]]
switch -glob $myuri {
*/livelink/livelink.exe* {
set replaceURI [string map [list /livelink/livelink.exe /OTCS/cs.exe] $myuri ]
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"
}
}
}
- ChrisBlack_1713Sep 23, 2014
Nimbostratus
THANKS!!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects