Linking to a Course Doesn't Redirect

Linking to a Course Doesn't Redirect

by Rob Cole -
Number of replies: 3

I have moved Moodle to a new server. The URL is the same, although I did add an SSL certificate. I am running Moodle 2.8.

In my courses, I link to other courses. It should go to /mod/url/view.php?id=174, which would redirect to the actual course /course/view.php?id=35 . Since the move it takes me to /mod/url/view.php?id=174 with the message "Click /course/view.php?id=35 link to open resource." and neglects to redirect me to the course.

How can I configure the Moodle site to just redirect me to the page, instead of displaying this intermediary page?

Thanks,
RC

Average of ratings: -
In reply to Rob Cole

Re: Linking to a Course Doesn't Redirect

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

You could change the links to the '/course/view.php?id=X' format, e.g. '/course/view.php?id=35'.

In reply to Gareth J Barnard

Re: Linking to a Course Doesn't Redirect

by Rob Cole -
I have over 200 courses that were working just fine. So now I have to change all of the links because I moved the server (not the domain) to a different IP address. Is there an easier way to fix the issue programmatically or configurationally?
In reply to Rob Cole

Re: Linking to a Course Doesn't Redirect

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Have you

a) run the database script for when changing a server name to change any hard coded links (to ensure they are https not http)

b) put a redirect on your server (ie apache in the sites-available config) to redirect port 80 (http) to https?