Moodle Mobile app not working with Apache redirection

Moodle Mobile app not working with Apache redirection

by Lucas Jaunin -
Number of replies: 4

HI,

For the convenience, we redirect (via Apache) a short moddle URL (www.cepv.ch/moodle) to a long one (https://www.cepv.ch/cepv/informatique/services/moodle/).

Using Moodle Mobile app, the connexion works fine with the long URL (web services OK).

With the short URL it works fine in a browser, but it doesn't with the Moodle Mobile app.

Error message : "Missing parameter (username) required" ("Paramètre requis (username) manquant" in french, my translation).

Any ideas for finding a workaround?

Thanks! Regards, LJ


Moodle 2.6.3+

Average of ratings: -
In reply to Lucas Jaunin

Re: Moodle Mobile app not working with Apache redirection

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi, 

I see that the redirection goes to https://moodle.cepv.ch/login/index.php not the URL you pointed out, is this correct?

Cheers, Juan

In reply to Juan Leyva

Re: Moodle Mobile app not working with Apache redirection

by Lucas Jaunin -

Hi,

You are right, but only for the login step, after which the redirection is the one I have indicated.

My webmaster made a configuration change: in addition to the redirection, he placed moodle in a subdomain (https://moodle.cepv.ch/).

Login in with the Moodle Mobile app works fine (using the subdomain URL).

Thanks! Regards, LJ


In reply to Lucas Jaunin

Re: Moodle Mobile app not working with Apache redirection

by Eric Katchan -

I am having a similar issue.  My moodle site is hosted at


https://moodle.concordia.ca/moodle


If I place moodle.concordia.ca. in the mobile app, I get an error that it is not configured.  If I add the


moodle.concordia.ca/moodle it works.


I noticed in the logs that it is navigating to /login/token.php which does not exist from document root.  I created the file from docroot and used header redirect  to https://moodle.concordia.ca/moodle/login/token.php which appeared to redirect however the username was missing.


Should I be setting any cookies etc before redirection?  This only appears to fail with mobile


Eric

In reply to Eric Katchan

Re: Moodle Mobile app not working with Apache redirection

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

unfortunately the mobile app does not support redirections and is something we won't be able to support because is a limitation of the technology we use (XHR requests)

You must advice your users to enter the correct URL

Juan