HELITG_35878
Aug 08, 2006Nimbostratus
iRule for HTTP to HTTPS using a specific pool for a specific virtual directory
Hi everyone,
I'm new to writing irules and I need some guidance on this one.
For a specific virtual directory I want to ensure all visitors use ssl
i.e
for requests to anything beginning http://www.site.com/secure1
I want the uri to be re-written as
https://www.site.com/secure1
and be directed to use a specific pool, say pool1
I was thinking on the lines of
when HTTP::REQUEST {
if ((http_host matches_regex "www.site.com") and (http_uri starts_with "/secure1"))
{
HTTP::redirect https://[HTTP::Host][HTTP::uri]
}
Any help would be appreciated.
Thanks in advance.