1

I have a following configuration for apache.

<VirtualHost *:80>
    ServerName example.com
    Redirect permanent / https://example.com/
</VirtualHost>
<VirtualHost *:443>
    ServerName example.com
    SSLEngine on
    SSLCertificateFile <path to ssl certificate file>
    SSLCertificateKeyFile <path to key file>
    SSLCACertificateFile <path to CA certificate file>
</VirtualHost>

I need help to redirect all http subdomains to https subdomains. Thanks in advance.

e.g.

  1. http://example.com to https://www.example.com
  2. https://example.com to https://www.example.com
  3. http://subdomain.example.com to https://subdomain.example.com
Jaymin Shah
  • 11
  • 1
  • 3

0 Answers0