How to use HTTPS in Moodle site

Tag: |   Category:

Follow the below steps...

1. Login to your Moodle site and go to Site Administrator > Security > HTTP security

2. Tick Use HTTPS for logins and Secure cookies only

3. Now edit your config.php as show below

$CFG->wwwroot = '';
$CFG->wwwroot = '';

and, add this line if not already there


4. Next, Set up a redirect in your .htaccess file. Place the following code to force the https:// redirect.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$$1 [R,L]

Save the .htaccess file.

Copyright © 2024 Siam Naulak.