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_12Historic F5 AccountSure! 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]" } }
- hoolio
Cirrostratus
Be aware that if you redirect a POST request, the client will make a GET request to the new location and not submit the POST data. Here are some suggestions from a related post:
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