Forum Discussion
Sean_McGirk_859
Nimbostratus
Apr 17, 2008I Rule not working as expected
This was originally used on an old V4.x LTM. I updated the syntax for V9.x. This is a simple HTTP to HTTPS redirect but it is not working as I expected. Not only does it not redirect but it breaks the entire VIP.
when HTTP_REQUEST {
if { [TCP::server_port] == 80} {
HTTP::redirect "https://test.spheris.com"}
else {
discard
}
}
2 Replies
- JRahm
Admin
Is port 80 your real server's port? Either way, the error's might be in the placement of your curly brackets. Try this:when HTTP_REQUEST { if { [TCP::local_port] == 80 } { HTTP::redirect "https://test.spheris.com" } else { discard } }
- Sean_McGirk_859
Nimbostratus
Awesome, that works. Thank you very much!
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