Forum Discussion
Yozzer
Sep 13, 2012Nimbostratus
Parse error: PARSE syntax 372
Hi, I get the following parse error:
01070151:3: Rule [irule_redirect] error:
line 13: [parse error: PARSE syntax 372 {syntax error in expression "
return
": variable references require preceding $}] [{
return
}]
line 15: [undefined procedure: else] [else]
line 15: [deprecated usage, use else or elseif] [ ]
with this code:
when HTTP_REQUEST {
set name "DC"
if {([string tolower [HTTP::method]] eq "get") && ([string tolower [HTTP::uri]] eq "/") && ([string tolower [HTTP::header "Referer"]] ne "http://cba.com") } {
if {([string tolower [HTTP::cookie value $name]] contains "session=&") } {
HTTP::redirect "http://www.abc.com"
} elseif {
return
} else {
HTTP::redirect "http://www.abc.com"
}
}
}
Any ideas what im doing wrong?
Thanks
- Michael_YatesNimbostratusHi Yozzer,
when HTTP_REQUEST { set name "DC" if {([string tolower [HTTP::method]] eq "get") && ([string tolower [HTTP::uri]] eq "/") && ([string tolower [HTTP::header "Referer"]] ne "http://cba.com") } { if {([string tolower [HTTP::cookie value $name]] contains "session=&") } { HTTP::redirect "http://www.abc.com" } else { HTTP::redirect "http://www.abc.com" } } }
- YozzerNimbostratusThanks Michael
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