Force the use of SSL
Posted by: Claudius (---.bardstown.com)
Date: February 10, 2022 10:46PM

I'm running WAMP on a win 10 machine and I am using, "whynopadlock.com" to check the integrity of the configuration work that I have been doing. The last problem that, "whynopadlock.com" indicates is that I need to force the use of HTTPS exclusively on my webserver. Does anyone know how to accomplish this?

Thank you in advance for your time and very best regards...

Re: Force the use of SSL
Posted by: Otomatic (Moderator)
Date: February 11, 2022 09:45AM

Hi,

In the VirtualHost definition in httpd-vhosts.conf, before DocumentRoot, insert :
   RewriteEngine On
   RewriteCond %{HTTPS} !=on
   RewriteRule ^ []%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Sorry, only registered users may post in this forum.