Forum Discussion
Gill_32697
Sep 03, 2013Nimbostratus
redirects with get / post
We have created iRules to perform redirects on existing web services. All the rules appear to work correctly when performing a HTTPGet. However, when connecting from another application, the request ...
- Sep 04, 2013
It get redirected to a GET request
Kevin_Stewart
Sep 04, 2013Employee
Not to throw the conversation into a tangent, but are you certain that the iRule works with GET requests? You're using a glob switch but no glob patterns, so not sure where the matches are being made. Here's a slightly modified version of your iRule:
when HTTP_REQUEST {
if { ( [string tolower [HTTP::host]]) contains "unity.mysite.com" } {
switch -glob [string tolower [HTTP::uri]] {
"*akcelrons.asmx*" {
HTTP::redirect "https://webservice.mysite.com/Unity/akcelrons.asmx"
}
"*credispher.asmx*" {
HTTP::redirect "http://webservice.mysite.com/Unity/credispher.asmx.asmx"
}
"*interfaceser.asmx*" {
HTTP::redirect "https://webservice.mysite.com/Unity/interfaceser.asmx"
}
"*meridian.asmx*" {
HTTP::redirect "https://webservice.mysite.com/Unity[HTTP::uri]"
}
"*unitysale.asmx*" {
HTTP::redirect "https://webservice.mysite.com/Unity/unitysale.asmx"
}
"*unitywep.asmx*" {
HTTP::redirect "https://webservice.mysite.com/Unity/unitysale.asmx"
}
"*weblott.asmx*" {
HTTP::redirect "https://webservice.mysite.com/Unity/Unityweblott.asmx"
}
}
}
}
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