Forum Discussion
Julian_Grunnell
Nimbostratus
Jan 09, 2007Specific HTTP to HTTPS redirect
Hi - can someone please help with an iRule I need to do the following please. I have a single HTTP pool and 2 VIPS, one for HTTP and one for HTTPS traffic. The HTTPS VIP does clientssl / SSL termination so only clear text traffic is passed to the pool. I would like an iRule that always redirects a request for http://domain/contactus.aspx to goto https://domain/contactus.aspx. All other parts of the site are just port 80.
I've tried some of the HTTP to HTTPS iRules but they don't really seem to fit the bill here.
Thanks in advance - Julian.
1 Reply
- hoolio
Cirrostratus
Hello,
If you want to have the BIG-IP send a 302 redirect when a client makes a request to http://domain/contactus.aspx to https, you can use a rule like this on the HTTP virtual server:when HTTP_REQUEST { if { [HTTP::uri] == "/contactus.aspx" }{ HTTP::redirect "https://[HTTP::host]/contactus.aspx" } }
[HTTP::host] will be resolved to the host header value in the client's request. All other requests not made to /contactus.aspx will be unaffected.
Aaron
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