Forum Discussion
big_9869
Nimbostratus
May 24, 2013http redirect via tcp
Hi Everyone
I need to generate a redirect on the http ports 80 and 443. I want to use tch and not an http redirect since the vip is ageneral TCP one.
I have to assume if this can be done with http it can also be done with tcp.
I.E. redirect from this vip to somplace.com oth the like.......
ideas welcome
thanks
3 Replies
- Kevin_Stewart
Employee
Assuming you're also terminating SSL on your 443 VIP, something like this should work:TCP::respond "HTTP/1.1 302 Found\r\nLocation: http://www.google.com\r\n\r\n" - nitass
Employee
Assuming you're also terminating SSL on your 443 VIP, something like this should work: just wondering shouldn't it be SSL::respond rather than TCP::respond (because it is https).[root@ve10:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.19.252:443 ip protocol 6 rules myrule profiles { clientssl { clientside } tcp {} } } [root@ve10:Active] config b rule myrule list rule myrule { when CLIENTSSL_HANDSHAKE { SSL::respond "HTTP/1.1 302 Found\r\nLocation: http://www.google.com\r\n\r\n" } } [root@ve10:Active] config curl -Ik https://172.28.19.252 HTTP/1.1 302 Found Location: http://www.google.com - Kevin_Stewart
Employee
Good catch. Yes, SSL::respond if it's SSL and TCP::respond otherwise.
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