Forum Discussion
Brendan_Hogan_9
Nimbostratus
Apr 21, 2006Cannot get redirect to work
Desired result:
If HTTP_REQUEST is http or https
output = https.
Also, if URI is "/", then append "/ps/signon.html"
The following works as long as request is http and not...
Colin_Walker_12
Apr 21, 2006Historic F5 Account
Well, first of all, to be able to read the path information of an SSL encrypted HTTP request via an iRule, you have to make sure that your BIG-IP is set to terminate SSL for the connection.
Once you have the client SSL profile enabled, then you should be able to read the info as if it were plain text.
That would allow you to make use of a rule such as:
when HTTP_REQUEST {
if { [HTTP::path] equals "/" } {
HTTP::redirect "https://[HTTP::host]/ps/signon.html"
}
}This should work regardless of whether the request is HTTP or HTTPS (assuming it is applied to both a port 80 and port 443 virtual for the same IP address), and it will also make sure that if the path is only a slash ("/"), that the request is redirected properly to the signon page.
HTH,
Colin
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
