Require SSL

 
Use the code below to force the use of an SSL certificate unless the exact Fully Qualified Domain Name (FQDN) listed in line three is entered:

            SSLOptions +StrictRequire
            SSLRequireSSL
            SSLRequire %{HTTP_HOST} eq "www.you-site.com"
            ErrorDocument 403 https://www.your-site.com
Just don’t forget to replace www.your-site.com on lines three and four with your actual domain name.
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

.htaccess in WordPress

Please visit our channel & subscribe: https://youtube.com/dhakawebhost   The .htaccess file...

Where the .htaccess file located and what's .htaccess got to do with It?

Please visit our channel & subscribe: https://youtube.com/dhakawebhost   The...

How to download .htaccess file?

Please visit our channel & subscribe: https://youtube.com/dhakawebhost   You can download a...

How to create a .htaccess file?

Please visit our channel & subscribe: https://youtube.com/dhakawebhost   Depending on your...

Where to Add Your Changes?

Please visit our channel & subscribe: https://youtube.com/dhakawebhost   When you’re...