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...
Juan_María_Rodr
Nimbostratus
Mar 02, 2006Thank citizen, but I'd like that when I access to www.pepito.com, it is redirected to www.pepito.com/maintenance/index.html. I don`t know how to do that. For example, I tried these:
when HTTP_REQUEST {
if { [HTTP::path] equals "www.pepito.com"} {
set [HTTP::uri] "/maintenance/index.html"
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
}
}
when HTTP_REQUEST {
if { [HTTP::host] equals "www.pepito.com" and [HTTP::uri] equals ""} {
set [HTTP::uri] "/maintenance/index.html"
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
}
}
when HTTP_REQUEST {
if { [HTTP::host] equals "www.pepito.com" and [HTTP::uri] equals ""} {
HTTP::redirect "http://[HTTP::host]/maintenance/index.html"
}
}
In these cases, I stayed in www.pepito.com and I wasn´t redirected to www.pepito.com/maintenance/index.html.
Help SOS
Thanks
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