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 ...
nitass
Employee
May 24, 2013Assuming 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
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