Forum Discussion
Corey_Webb_9791
Nimbostratus
Dec 18, 2007Redirect HTTP to HTTPS without using HTTP_REQUEST trigger
I need to redirect traffic that comes to my VIP as http:\\x.y.z to https:\\x.y.z however since there is no actual HTTP_REQUEST triggered when the request comes in as http I need to trigger this redirect with some other trigger that happens before the request like port or client address but none of these seem to allow for the HTTP::redirect command to be issued. Any Ideas???
Thank you,
Corey
- Colin_Walker_12Historic F5 AccountI'm not sure I follow. Why is there no HTTP_REQUEST even triggered?
- Corey_Webb_9791
Nimbostratus
There is no HTTP_REQUEST triggered because HTTP(port 80) is not running on the physical server it only is running 443. This is simply a redirect to allow users to be lazy and not type https. - Corey_Webb_9791
Nimbostratus
Here is how is looked in Version 4 - Colin_Walker_12Historic F5 AccountThe HTTP_REQUEST event fires when the LTM sees an HTTP_REQUEST come in from the client. It has nothing to do with what is, or isn't running on the server.
- Corey_Webb_9791
Nimbostratus
well according the packet captures that I am doing I am getting a HTTP Get packet to the VIP and not processing the I rule so what else should I look at to see why the HTTP_REQUEST is not getting triggered. When I send the same host and uri only using https it triggers the HTTP_REQUEST. Not sure why it is not triggering the HTTP_REQUEST then do you know why? - Colin_Walker_12Historic F5 AccountWhen you say "the VIP", are you saying that there is only one Virtual for both port 80 and port 443 traffic? Meaning it's listening on all ports?
- Corey_Webb_9791
Nimbostratus
one VIP running all ports - Corey_Webb_9791
Nimbostratus
Looks like when I take my client ssl profile out which has the certificate assigned to it then I can get to the site using the HTTP address but now I can not get to it using the HTTPS site any ideas on how I can make this work. - Corey_Webb_9791
Nimbostratus
Rule looks like this now. - Colin_Walker_12Historic F5 AccountSlight rule mod, too:
when HTTP_REQUEST { if {[string tolower [HTTP::uri]] starts_with "/idhan" } { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } elseif { [string tolower [HTTP::uri]] starts_with "/hanhelp"} { pool NETDEV } else { discard } }
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