Forum Discussion
Joe_Pipitone
Nimbostratus
Mar 10, 2010iRule error in logs
The iRule below is throwing the following error in our logs. Can anyone help?
TCL error: our-rewrite HTTP_REQUEST - Operation not supported. Multiple redirect/respond invocations not allowed line 2 invoked from within HTTP::redirect http://sitename.org[HTTP::uri] default arm line 1 invoked from within switch -glob [HTTP::host] { / { HTTP::redirect http://sitename.org } default { HTTP::redirect http://sitename.org[HTTP::uri]...
Here's the iRule:
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.sitename.org") } {
switch -glob [HTTP::host] {
"/" { HTTP::redirect "http://sitename.org" }
default { HTTP::redirect "http://sitename.org[HTTP::uri]" }
}
}
}
- The_Bhattman
Nimbostratus
Hi Joe,when HTTP_REQUEST { if { ([HTTP::host] eq "www.sitename.org") } { set blah [HTTP::uri] switch -glob [HTTP::host] { "/" { HTTP::redirect "http://sitename.org" } default { HTTP::redirect "http://sitename.org$blah" } } } }
- Joe_Pipitone
Nimbostratus
From what I've read, the error relates to having 2 redirects in the same statement - does this help? - hoolio
Cirrostratus
Hi 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