Forum Discussion
hooleylist
Jun 30, 2008Cirrostratus
Do you have non-SSL enabled on the client SSL profile? This will be required in order to issue a redirect on a non-SSL request.
If it still doesn't work, can you try this version with logging:
when CLIENT_ACCEPTED {
log local0. "[IP::client_addr]:[TCP::client_port]: new connection to [IP::local_port]:[TCP::local_port]. https 0"
Set a variable to track whether this is an HTTPS request
set https 0
}
when CLIENTSSL_HANDSHAKE {
log local0. "[IP::client_addr]:[TCP::client_port]: new connection to [IP::local_port]:[TCP::local_port]. https 1"
There was a client side SSL handshake, so update the variable
set https 1
}
when HTTP_REQUEST {
If it's not an HTTPS connection, send a redirect
if {not ($https)}{
log local0. "[IP::client_addr]:[TCP::client_port]: new connection to [IP::local_port]:[TCP::local_port] redirecting http"
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
Aaron