Mike_Devlin_108
Mar 03, 2010Nimbostratus
Striping www from the URL
Hello,
I guess I'll start by explaining the desired result. The virtual server will be listening on port 443, and will have an SSL certificate of *.company.com. Given that a wildcard SSL cert will only terminate back one level (based on RFC2818), I need to be able to re-write or re-direct the following:
https://www.customer1.company.com to https://customer1.company.com before SSL termination takes place. The idea is that the customer will not be presented with the SSL mismatch error.
So now, i ask, can i do that? and if so, how?
I was thinking something like, but i don't know if it will work, or the correct syntax:
when HTTP_REQUEST {
if {[HTTP::host] starts_with "www."} {
variable = everything_after_www.
redirect to "https://variable[HTTP::uri]"
}
}
Thanks in advance.