veyond_113181
Mar 13, 2007Nimbostratus
redirect domain.com to https://www.domain.com
I am using a http redirect rule to redirect all http traffic to https. That works fine but the problem I am having is that the SSL cert is only for www.domain.com. The client is very picky and wants domain.com to work as well. So, I have created the following rule:
when HTTP_REQUEST {
if { [HTTP::host] equals "http://domain.com"}{
HTTP::redirect "https://www.domain.com[HTTP::uri]"
}
}
The problem is I am not sure where to put this. I have added it to the irules for www.domain.com but it doesnt work. When i try to create a new virtual server and point it to the same IP address I get:
01070333:3: Virtual Server domain.com illegally shares both address and vlan with Virtual Server www.domain.com.
What is the best way to take all domain.com traffic and forward it to www.domain.com?
Thanks,
Tate