Forum Discussion
ucgwebmaster_95
Nimbostratus
May 21, 2008http to https for specfic pages
Good Day,
I am a newbie to the F5 and Irules. I work more on the operations side and our developers have come to me with a task. we have a site. http://my.site.com
I have setup a VS for port 80 and a vs for 443. I am using SSL offloading so when the developers attempt to code for requiring SSL it fails. They need to actually put the https link in the code. They are going to redesign the site and only want http://my.site.com/login.aspx and http://my.site.com/checkout.aspx to be https.
Please help!!!1
- Colin_Walker_12Historic F5 AccountSo you want to inspect traffic and if it's one of those two URLs send it through the HTTPS VS?
when HTTP_REQUEST { switch "[HTTP::host][HTTP::uri]" { "http://my.site.com/login.aspx" - "http://my.site.com/checkout.aspx" - default { HTTP::redirect https://[HTTP::host][HTTP::uri] } }
- ucgwebmaster_95
Nimbostratus
Thank you for the quick response. I just found out that it may be for multiple pages. This rule appears to be a good start though. I will need to test it out to make sure. - hoolio
Cirrostratus
A minor note: [HTTP::host] won't contain the protocol, so you can remove "http://" from the switch cases.when HTTP_REQUEST { Remove all existing HTTP headers with our name while {[HTTP::header exists Https-Enabled]}{ HTTP::header remove "Https-Enabled" } }
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