Forum Discussion
redirect http requests to https
Hi SP,
if is the only web application on the IP, then simply redirect to a fixed HOST-value. It will work in any case...
when HTTP_REQUEST {
HTTP::respond 301 "Location" "https://www.domain.com[HTTP::uri]"
HTTP::respond 302 "Location" "https://www.domain.com[HTTP::uri]"
}
Note: If you don't use HTTP to access your web site and also not plan to use it in the future, then it would be far more elegant to send a 301 (Permanent Redirect) instead of 302 (Temporary Redirect) response. The
command can only send 301 (Temporary Redirect) responses, but the HTTP::redirect
command can either send a HTTP::respond
or 301
redirect response (see example above). 302
Cheers, Kai
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