Forum Discussion
big_9869
Nimbostratus
May 17, 2013http redirect using tcp
Hi Folks
good morning
I'm new to iRules so I hope I'm not asking something thats been answered previously
I want to do an http redirect but I don't want to use http since the VIP is a ge...
JRahm
Admin
May 17, 2013Try this:
when CLIENT_ACCEPTED {
if { ... } {
TCP::respond "HTTP/1.0 302 Found\r\nServer: BIG-IP\r\nLocation: http://www.someplace.com\r\nConnection: close\r\n\r\n"
TCP::close
return
}
}
As far as the URI is concerned, if you are not using the HTTP profile, you'll have to do a TCP::collect and pull that out of payload, which will likely be a far greater effort than splitting off a new virtual and using the http profile.
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
