Forum Discussion
Redirect from HTTPs to HTTP
Hi I have WebSite xyz.com/something works in HTTPs I want this Website to work in HTTP http://xyz.com/something except specific URLs to work with HTTPs EX: https://xyz.com/something/somthingelse https://xyz.com/something/anything
appreciate your help
1 Reply
- Michael_Jenkins
Cirrostratus
For that, you'll need to have the 2 VIPs (one for http and one for https), and on the HTTP vip, you could use an iRule like this to force https:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/something/somethingelse*" - "/something/anything*" { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } default { Do nothing for the rest of them } } }Then if you want the opposite for the HTTPS VIP, you can just create a new iRule basically the same except that you redirect in the the
section instead and do nothing in the matched section of the switch statement.default
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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