Forum Discussion
Juan_María_Rodr
Nimbostratus
Mar 02, 2006redirect and loop, please help
Hello.
Could anyone tell me why this iRule ends in a loop?
when HTTP_REQUEST {
if { [HTTP::host] equals "www.pepito.com"} {
HTTP::redirect "http://www.pepito.com/mainten...
JRahm
Admin
Mar 02, 2006The redirect is using the same host that the if condition is looking for. Are you trying to match for an empty URI? If so, try something like this:
when HTTP_REQUEST {
if { ([ string length [HTTP::uri] ] <= 1) } {
if { [HTTP::host] equals "www.pepito.com"} {
HTTP::redirect "http://www.pepito.com/maintenance/index.html"
}
}
}NOTE: Not Tested!
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
