I'd like to setup my moodle instance to be available by address: http://mymoodle.mysite.com.
mysite.com is already registered and I can easily access it because I've configured it at my hosting provider to refer to the IP (let's say IP address x.x.x.x
) of my server where I store my web page.
To register the subdomain I'm specifying another IP address where my moodle instance is installed (e.g. y.y.y.y
) and configure my provider to do permanent redirect to the URL http://y.y.y.y
moodle instance is installed at wwwroot folder of the web sever, it's accessible via http://y.y.y.y
Now it works for me in the following way: I type http://mymoodle.mysite.com in address bar of my browser and it redirects me to my moodle instance, I see a main screen, all works fine but the URL in address bar is changed to http://y.y.y.y
Alhtough I'd like to see my fancy subdomain address but not IP.
My config.php originally looks like that
$CFG->wwwroot = 'http://y.y.y.y';
but if I change it to
$CFG->wwwroot = 'http://mymoodle.mysite.com';
I'm getting into 'endless redirects'.
Is there a way to resolve this issue and get rid of IP address in address bar?