Forum Discussion
Beau_Monday_107
Nimbostratus
Sep 15, 2005Redirect to https only on the login page?
We want to be able to force a user to enter an HTTPS session if they arrive at the login page, but the rest of the application can operate under HTTP. I am trying to use this rule to accomplish this:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "SYS_login.asp" } {
HTTP::redirect "https://[HTTP::host]/[HTTP::uri]" }
}
Unfortunately, I get stuck in a redirect loop if the user already has specified "https://" when entering the site.
Suggestions?
1 Reply
Sort By
- unRuleY_95363Historic F5 AccountYeah, you can make sure the rule is only on your http virtual and not on your https virtual.
when HTTP_REQUEST { if { ([TCP::local_port] == 80) and ([HTTP::uri] ends_with "SYS_login.asp") } { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
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