General help

 
 
Picture of Hugh Edwards
www Root not working. V2.5.1
 

Hi Everyone, 

This link: http://mysite.com/moodle works. 

This link: http://www.mysite.com/moodle doesn't work and comes up with a redirect page. I've tried for a good hour to find this setting in Moodle and I can't! 

Can anyone help? 

Hugh. 

 
Average of ratings: -
Picture of Jez H
Re: www Root not working. V2.5.1
Group Particularly helpful Moodlers

It sounds similar to this:

https://tracker.moodle.org/browse/MDL-39416?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel

though that says it was fixed for 2.5.1.

If you turn debugging can you see any output on the redirect page

If you are running Apache you could try a work around of using a .htaccess file for the interim, something along the lines of this:

http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www

using that Apache would do the redirect, moodle would never see the "www" version of the URL.

 
Average of ratings: -
Picture of Hugh Edwards
Re: www Root not working. V2.5.1
 

Hi Jet et al. 

I think it must be a simpler solution than that. I turned on Debugging on full, and there was no output on this page. I simply get this page, which then redirects. FYI, I'm accessing the page via www.gravyforthebrain.com/moodle - as you can see, it's complaining about the www. part, even though wordpress is running on www. and DNS is set up (as well as the SSL) for www. 

Any ideas? smile 

 

 
Average of ratings: -
Walking on the snow towards Lago Nero...
Re: www Root not working. V2.5.1
Group DevelopersGroup Particularly helpful Moodlers

Hi All,
for several reasons, the Hostname part of the URL must match what has been written in the config.php file, in $CFG->wwwroot: change it according with your main site URL.

HTH,
Matteo

 
Average of ratings: -
Picture of Hugh Edwards
Re: www Root not working. V2.5.1
 

Hi Matteo, 

Thank you for your help - that indeed fixed it - I just changed the path in the config.php and all is now well. smile 

smile 

 
Average of ratings: -