Forum Discussion
Technological_S
Nimbostratus
Dec 18, 2006SSL Profile selection on Server Side.
Hi team.
I am writing two iRule, the first for select a pool usgin the uri, like this (this iRule work fine).
when HTTP_REQUEST {
log local0. "Start - iRule"
if {[HTTP::uri] equals "/"}
{
log local0. [HTTP::uri]
HTTP::redirect "https://[HTTP::host]/gateway"
}
elseif {[HTTP::uri] contains "/gateway"}
{
log local0. [HTTP::uri]
HTTP::redirect "https://gateway.es.atosorigin.com"
}
elseif {[HTTP::uri] contains "/exchange"}
{
log local0. [HTTP::uri]
HTTP::header insert FRONT-END-HTTPS "on"
pool AO_IT-IS_Pool_OWA
}
elseif {[HTTP::uri] contains "/exchweb"}
{
log local0. [HTTP::uri]
HTTP::header insert FRONT-END-HTTPS "on"
pool AO_IT-IS_Pool_OWA
}
elseif {[HTTP::uri] contains "/public"}
{
log local0. [HTTP::uri]
HTTP::header insert FRONT-END-HTTPS "on"
pool AO_IT-IS_Pool_OWA
}
elseif {[HTTP::uri] contains "/ahora"}
{
log local0. [HTTP::uri]
HTTP::redirect "https://[HTTP::host]/atosoriginSPP"
pool AO_IT-IS_Pool_AHORA
}
elseif {[HTTP::uri] contains "/atosoriginSPP"}
{
log local0. [HTTP::uri]
pool AO_IT-IS_Pool_AHORA
}
elseif {[HTTP::uri] contains "/km"}
{
log local0. [HTTP::uri]
pool AO_IT-IS_Pool_KMSEMA
}
else
{
log local0. "Excepcion"
log local0. [HTTP::uri]
}
log local0. "End - iRule"
}
But in the second iRule, not run, In the second I want select the apropiate SSL profile in the server side, because 4 Pool listening SSL protocol (HTTPS) but 1 pool listening HTTP not secure protocol, I write this iRule.
when SERVER_CONNECTED {
log local0. "server connected"
if {[TCP::server_port] equals"443"}
{
log local0. "conectado a puerto seguro"
SSL::profile AO_IT-IS_ServerSSL
}
else
{
log local0. "conectado a puerto no seguro"
}
}
But when execute this iRule I see the following error in the LTM log.
---
TCL error: Rule AO_IT-IS_APPL_SWITCH - wrong args: should be "SSL::profile " while executing "SSL::profile AO_IT-IS_ServerSSL"
---
Any susgestion ......
Regards
Carlos Fontecha
- hoolio
Cirrostratus
I haven't tested this, but I would guess there might be a problem with the hyphen in the ssl profile name. Could you rename the profile so it doesn't include a - and retest?
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