HTTP::Redirect to www

I am trying to figure out how to write an iRule that will take https://aciphexoffer.com and redirect it every time to https://www.aciphexoffer.com , so that when someone puts in the URL with out the www, they do not get a SSL cert error. We messed up and our developers did not have a ticket put in to get a cert for the domain without www and we do not control the DNS. So we need a fast fix on this.

I do have this:

when HTTP_REQUEST {

HTTP::redirect http://www.[getfield [HTTP::host] “:” 1][HTTP::uri]

}

But this always adds the www. to anything that is requested, even if they already have put in www in the URL.

Can anyone take a look and help me out on this.

Thanks in advance for any pointers or cures.

razorack---

Ok looks like I have found a fix for this is this post:

This forum rocks.

Thanks,

razorack---

Ok this did not work, maybe I should explain further asa i am new to this.

The url’s involved are all https, now this did work for the 80 virt site, but the problem I am having is that when someone types:

https://aciphexoffer.com into their browser they get the cert for www.aciphexoffer.com as we did not order a cert for aciphexoffer.com with out the www.

Any ideas???

Thanks,

razorack

Ok after reading further in this forum I see that this is really not possible and makes complete sense.

Thanks again,

razorack--