Rewrite Not Working

Let me preface this, by stating upfront that I am not a developer by trade. :o)

I've got a SSL for mydomain.com, not www.mydomain.com. Right now, I'm forwarding all requests for mydomain.com to https://mydomain.com with an IIS redirect and that is working fine.

When I attempt to go to www.mydomain.com, I get "This page must be viewed over a secure channel". If I use https://www.mydomain.com, I get "The security certificate presented by this website was issued for a different website's address."

So I loaded the IIRF Rewrite, but it's not working right. Here's the script:

Thanks again for the reply. I think it's working somewhat. If I go to http://www.mydomain.com, it says "This page must be viewed over a secure channel". If I make it https://www.mydomain.com, it successfully redirects me to https://mydomain.com.