Help with redirect from HTTP to HTTPS

Re: Help with redirect from HTTP to HTTPS

by Carolyn McIntyre -
Number of replies: 2

I've managed to sort this by creating a new .htaccess file in my root directory and adding the following:

RewriteEngine On 

RewriteCond %{SERVER_PORT} 80 

RewriteRule ^(.*)$ {SERVER_NAME}/$1 [R,L]

In reply to Carolyn McIntyre

Re: Help with redirect from HTTP to HTTPS

by eduardo matriz -

I has the same problem, where I can find root directory?

Is the root directory is wwwroot?


In reply to eduardo matriz

Re: Help with redirect from HTTP to HTTPS

by Mathew Gancarz -
Picture of Core developers

Hi Eduardo, the root directory is the one that your web server is serving the moodle files from. It's the same one that you put the main moodle code files in, ie: where config.php and index.php reside.