ssl - Apache 2.4 url rewriting with https -
i'm trying url rewriting apache 2.4. want requests to http://subdomain.domain.com http://www.subdomain.domain.com https://www.subdomain.domain.com are remapped https://subdomain.domain.com to avoid error in ssl wildcard cert doesn't not match www.subdomain.domain.com. i tried with: <virtualhost ip:80> servername subdomain.domain.com rewriteengine on rewritecond %{https} off rewriterule (.*) https://%{http_host}%{request_uri} </virtualhost> <virtualhost ip:80> servername www.subdomain.domain.com redirect permanent / https://subdomain.domain.com </virtualhost> <virtualhost ip:443> servername www.subdomain.domain.com redirect permanent / https://subdomain.domain.com </virtualhost> <virtualhost ip:443> servername subdomain.domain.com ... ... ... my configuration works (1) , (2) not (3). mistake? ...