Forum Discussion
Chris_Olson
Aug 22, 2011Nimbostratus
https redirect requires /login.cmdx
My redirect works but only if I add an extension to my site.
For example: www.mysite.com/website-uat fails. However, www.mysite.com/website-uat/login.cmdx is successful. I don't want to m...
Chris_Olson
Aug 23, 2011Nimbostratus
I am having diffculty combining the rules. The logic appears to be what is needed but I don't understand the error.
when HTTP_REQUEST {
if {[HTTP::path] ends_with "/"{ HTTP::path "[HTTP::path]login.cmdx" }
}
switch [getfield [string tolower [HTTP::uri]] "/" 2] {
website { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
website-uat { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
website-sales { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
}
}
01070151:3: Rule error:
line 2: [parse error: PARSE syntax 51 syntax\ error\ in\ expression\ \"\[HTTP::path\]\ ends_with\ \"/\"\{\ HTTP::path\ \"\[HTTP::path\]login.cm...\":\ extra\ tokens\ at\ end\ of\ expression] [{[HTTP::path] ends_with "/"{ HTTP::path "[HTTP::path]login.cmdx" }
}]
line 3: [missing a script after "if"] []
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