Web host connecting error message

Re: Web host connecting error message

by Miguel Santos -
Number of replies: 0

Hi Anthony,

   That is a moodle message stating that you accessed the site with a url that DNS wise points to your moodle site, but does not match the url specified in the moodle sites config.php.

   I would suggest updating your url in config.php to be what you desire, and make sure both Apache and DNS match.  

   If you just want to skip the message I would suggest adding an apache Rewrite to do the redirect before moodle can show the page that executes the redirect.

 The rewrite would look something like this replacing the url with your sites url

RewriteCond %{HTTP_HOST} !=moodle.yourdomain.com [NC]
RewriteRule ^.*$ http://moodle.yourdomain.com%{REQUEST_URI} [L,R=302]