Forum Discussion
Any ideas on how to prevent the loop?
Good morning all,
I am working with an iRule that's normally easy, but not this time. Here's why:
when HTTP_REQUEST { if { [string tolower [HTTP::host]] ends_with "host.domainname.com" } { HTTP::respond 301 Location "https://host.domainname.com/uri/page.html" }}
what's happening here's that the iRule is running in to a redirect loop and thus failure.
Any ideas on how to prevent the loop?
Thanks in advance
1 Reply
- Kevin_Stewart
Employee
So just out of curiosity,
when HTTP_REQUEST { if { [string tolower [HTTP::host]] ends_with "host.domainname.com" } { HTTP::respond 301 Location "https://host.domainname.com/uri/page.html" } }are you redirecting to this same VIP? If so then you're basically saying
if host == "foo.com" then goto foo.comWhat are you trying to achieve? Just guessing here, but are you trying to redirect to a given URL if the user doesn't enter a URL?
when HTTP_REQUEST { if { [HTTP::uri] eq "/" } { HTTP::respond 301 Location "https:/host.domainname.com/uri/page.html" } }
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