Forum Discussion
JCMATTOS_41723
Nimbostratus
Sep 10, 2009redirect POSTs to HTTPS?
We have an LTM 9.4.7 and we would like to redirect POSTs to HTTPS is there an iRule to acheive this?
Colin_Walker_12
Sep 10, 2009Historic F5 Account
Sure! For this you'd use the HTTP::method command. If you just want to redirect all posts then it'd be a pretty simple logical check:
when HTTP_REQUEST {
if { [HTTP::method] eq "POST" } {
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
}
}
That's assuming that you want to keep the destination host and URI the same, of course.
Colin
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