Forum Discussion
Joe_Pipitone
Nimbostratus
Jun 05, 2009Simple redirect
I am trying to simply redirect one domain to another, but for some reason I am getting an error. The iRule looks like this:
when HTTP_REQUEST {
if { !([HTTP::host] "domain1.com") } {
HTTP::redirect "http://domain2.com"
}
}
The error I am getting is:
01070151:3: Rule [Redirect_test] error:
line 2: [parse error: PARSE syntax 44 {syntax error in expression " !([HTTP::host] "http://domain1.com") ": looking for close parenthesis}] [{ !([HTTP::host] "http://domain1.com") }]
I have a closing parenthesis, can anyone help?
- Joe_Pipitone
Nimbostratus
I figured it out, the syntax was wrong:
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