Forum Discussion
Patrick_Berthia
Nimbostratus
Feb 10, 2006HTTPS redirect
Hi,
Im trying to make this work but not getting the expected results.
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect https://[HTTP::host][HTTP::uri "/...
Feb 10, 2006
What results are you getting? Odds are the HTTP::uri command you have embedded is not returning the updated value that you are assigning it within the command. This would cause an infinite loop if you have the same iRule on the 80 and 443 virtuals.
Personally, I'd do something like this:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect "https://[HTTP::host]/some_java_app"
}
}
You don't need to reassign the HTTP::uri value if you are doing a redirect.
-Joe
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