Forum Discussion
Jeff_Durr_42068
Nimbostratus
Nov 03, 2006Redirecting based on url extension
I would appreciate some more I-rule experienced eyes looking at this redirect. I'm getting the following in the error logs.
TCL error: Rule xmro_redirect_http - invalid command name "" while executing "[HTTP::redirect https://xmro-secure.fred.com] "
I assume it's a syntax error, but I just don't know where I hosed it up.
My I-rule is as follows:
when HTTP_REQUEST {
if {[HTTP::uri] ends_with "/echannel"}{
[HTTP::redirect https://ecare.fred.com/echannel]
}
else { [HTTP::redirect https://xmro-secure.fred.com] }
}
Thanks
Jeff
- You don't need brackets around the commands in this context.
when HTTP_REQUEST { if {[HTTP::uri] ends_with "/echannel"}{ HTTP::redirect "https://ecare.fred.com/echannel" } else { HTTP::redirect "https://xmro-secure.fred.com" } }
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