Forum Discussion
Justin_Yaple_99
Nimbostratus
Aug 19, 2005uri redirect to http/uri
Im new to using the F5 BigIP load balancers, and am having trouble getting an http/uri to redirect to https/uri. Iv looked at as many examples I could find, but wasn’t able to make them work.
Basically Im trying to redirect http://host.com/login/login.asp to https://host.com/login/login.asp what would be the easiest means to do this?
3 Replies
- Colin_Walker_12Historic F5 AccountYaplej,
This is a pretty simple rule that would look like:when HTTP_REQUEST { if {[HTTP::host] eq "host.com" && [HTTP::uri] contains "login.asp"} { HTTP::redirect "https://[HTTP::host]/[HTTP::uri]" } }
-Colin - Justin_Yaple_99
Nimbostratus
Great I created my iRule https-login-redirect as follows:
when HTTP_REQUEST {
if {[HTTP::host] eq "www.firemountaingems.com" && [HTTP::uri] contains "login.asp"} {
HTTP::redirect "https://[HTTP::host]/[HTTP::uri]"
}
}
That look correct?
Then I assign it to the VS as a resource using manage iRules so after I do that it still doesnt redirect any http:\\www.firemountaingems.com requests that contain login.asp in the [HTTP::uri]
Am I missing something? - Colin_Walker_12Historic F5 AccountNo, that looks correct to me. Perhaps the if statement isn't matching? Have you tried just putting in the redirect statement, without the if comparison? Perhaps add some logging to see what's going on?
-Colin
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
