Forum Discussion
Troy_94246
Nimbostratus
Dec 10, 2009add www to a https host II
We are trying to us certificate for website. The certificate is assigned to https://www.Blah.com
When customer types https://Blah.com as the URL, they get a certificate error. I need to change the HTTPS request from https://Blah.com to https://www.Blah.com.
I found this post http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&postid=62114
I-rule 1
when HTTP_REQUEST {
if { !([string tolower [HTTP::host]] starts_with "www.") } {
HTTP::redirect http://www.[HTTP::host][HTTP::uri]"
}
}
and I-rule 2
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "customer.com" } {
HTTP::redirect "http://www.customer.com[HTTP::uri]"
}
}
I tested them both with no success. Any pointers would be greatly appreciated! Thanks!
- hoolio
Cirrostratus
If you can redirect the client to the correct hostname when they make an HTTP request, you can just use the existing cert. If your clients are making requests directly via HTTPS to customer.com, you could get a new UCC cert which is valid for customer.com and www.customer.com.
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