1

I need to point each http://sub.example.com subdomain to its corresponding https://sub.example.com.

This is for use with WordPress multisite and my wildcard DNS records and wildcard Certbot cert. Everything works on http, now I need it all to be https.

I use/need this and it works with all http:

ServerAlias *.example.com

I need my Apache config, NOT via .htaccess, to end up with something like this:

<IfModule mod_ssl.c>

   <VirtualHost _default_:443>
            ServerName example.com
            ServerAlias *.example.com

     #Other apache settings, incl SSL
   </VirtualHost>
</IfModule>

   <VirtualHost *:80>
           ServerName example.com
           ServerAlias *.example.com*
           Redirect permanent / https://*.example.com/
     #Other apache settings
   </VirtualHost>

(Please don't troll, don't down vote without explanation or a concise DUP that solves SSL with WordPress multisite via Apache .conf. I'm not interested in the 200+ upvoted encycopledia DUP on Rewrite, just what should go in my .conf.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.