Forum Discussion
Cathi_Hahn_3185
Nimbostratus
Jul 28, 2006Rule to redirect http to https
How do I write a rule to redirect someone from the virtual server "stuff" to the virtual server "stuff-ssl"? We need to force users who do not enter the "https://" to go to the SSL site. I don't nor...
hoolio
Cirrostratus
Jul 28, 2006A search for "redirect https" leads to this example:
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}All requests to the VIP will be redirected to HTTPS. If the original request contains a port in the host header field, it will be removed. So a request to:
http://mysite.com:80/index.php
would be redirected to:
https://mysite.com/index.php
I think this functionality will be built into the GUI using HTTP classes in an upcoming release.
Aaron
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