Calendar Thursday, March 28, 2024
Text Size
   

gary

 

When I heard that oxygen and magnesium hooked up I was like OMg.
Moodle Moment -Changing Domain Name PDF Print E-mail
Written by Administrator   

I often come across issues with Moodle when changing domain names. This happens when placing Moodle in a staging environment with a temporary domain name, and then moving it into production.

The problem is that Moodle by default loads images with an absolute URL. An absolute URL specifies the whole URL ... ie  http://www.mydomain.com/moodle/myimage.jpg.

A better method would be to use a relative URL. This would just use the location of the file on your server ( in the example above, /moodle/myimage.jpg), and leave the browser to remember which server using the current domain. But this has to be done manually for each image loaded.

To solve this issue, there is a useful script that has been written by the Moodle gurus, and available for use by a user with administrator rights.

http://www.mydomain/admin/replace.php

Replace the www.mydomain with your own site address, and then fill in the details asked, and all is sorted in an instant, or two.