views:

11

answers:

0

we are registered under verisign for mydomain.com, but not www.mydomain.com, so all of my ssl redirects must also remove the www. (if any). so the redirect must go to https://mydomain.com

it currently redirects to that with:

mydomain.com
www.mydomain.com
http://mydomain.com
http://www.mydomain.com

but does not work for:

https://www.mydomain.com

this is very important, because if the user goes there, because we are not registered with the "www.", they get a security page saying that they are going to a site that says they're registered but are not =(

here's my htaccess rewrite:

RewriteCond %{HTTP_HOST} !^(mydomain\.com)?$ [NC,OR]
RewriteCond %{SERVER_PORT} 80 [NC]
RewriteRule ^(.*)$ https://mydomain.com/$1 [R=301,NC,L]

any ideas as to how to extend that to include redirecting if they go to https://www.mydomain.com?

thanks!