Replies: 2 comments 6 replies
-
I've written a blog on how to enable security: With Apache, you can use a .htaccess file to redirect HTTP to HTTPS. .htaccess <IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
# This rule will redirect users from their original location to the same location but using HTTPS.
# i.e. http://www.example.com/foo/ to https://www.example.com/foo/
# The leading slash is made optional so that this will work either in
# httpd.conf or .htaccess context
</IfModule> |
Beta Was this translation helpful? Give feedback.
-
I discovered an easier way than my previous explanation: First complete the full Laragon install, open the app and do the basic configuration (enabling ssl, setting the name for the virtual hosts, then clicking apache in the menu and setting the ssl cert for windows....) THEN Edit "C:\laragon\bin\apache\httpd-2.4.54-win64-VS16\conf\httpd.conf" and look for: <Directory "C:/laragon/www">
Create a file in the www root called .htaccess for example: Add the content below and save RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]I've attached a .txt file with the full details! |
Beta Was this translation helpful? Give feedback.
-
How can I force http to https on installations of new (wordpress) sites
Having set SSL enabled it would be nice when the system uses https during the installation
Beta Was this translation helpful? Give feedback.
All reactions