http https and config.php

http https and config.php

by Peter Bazira -
Number of replies: 2
I have setup moodle on my intranet at school to run an online anatomy course and this it is doing quite fine...  {$CFG->wwwroot is set as 'http://domain/directory'}. However, if one needed to access moodle from outside our intranet (as some of my students have done) they are referred automatically to a https: link and they are unable to access moodle correctly. Is there a way i could set the $CFG->wwwroot to both http and https or would it still work if i got rid of the protocol bit and just went with wwwroot as domain/directory? .... i have really torn my hair out with this one ....

p.s. the only other option i would have based on the way the network is set up is to use relative links as opposed to absolute linksthoughtful.gif
Average of ratings: -
In reply to Peter Bazira

Re: http https and config.php

by Peter Bazira -
approve.gifimplemented a quick-fix ... simple if-else conditional on $_SERVER['SERVER_PORT']... is there a better way of doing this?