Forum Discussion
R_Marc
Nov 05, 2014Nimbostratus
First, a switch statement is probably a better route. They are, I'm told, much faster in iRules than ifs. I'm also not sure what the second part of that responder is about (the ">http...").
This would cover both of the above scenarios:
switch -glob [HTTP::uri] {
"/abc*" {
HTTP::respond 301 Location "
}
}
Response:
GET /abc HTTP/1.0
HTTP/1.0 301 Moved Permanently
Location: ">http://www.someplace.com/blah/blah/
Server: BigIP
Connection: close
Content-Length: 0
GET /abc/ HTTP/1.0
HTTP/1.0 301 Moved Permanently
Location: ">http://www.someplace.com/blah/blah/
Server: BigIP
Connection: close
Content-Length: 0