Redirect to HTTPS

Redirect to HTTPS

napisao/la Roger Domínguez Argemí -
Number of replies: 2

Hi Dani, Juan,


We have a Moodle 2.9.3 (Build: 20151109) environment and all external services related to Moodle Mobile are properly enabled. However, when we tried to access from the app we can not login and the error "A necessary parameter (username) missing" is shown.

We know that the app does not support the HTTPS redirects. We have analyzed and ruled out a redirection of this type at the server level. However, we have checked out the "htaccess" file and we believe that the line on the HTTPS redirection, even being commented, it seems that is still running because we still observe a redirect to https that should not be: 

On #RewriteEngine

#RewriteCond% {HTTPS} off

#RewriteRule (. *) Https: //% {}% {REQUEST_URI HTTP_HOST} [R, L]


On #RewriteEngine

#RewriteCond% {HTTPS} off

#RewriteRule (. *) Https: //% {SERVER_NAME} /% $ 1 [R, L]

 

Moreover, we have modified the file, putting the RewriteEngine to Off, but it seems that still does not work.

On the other hand, we have restarted the Apache service but I have just tried to log in with the official app and the same error occurs.

We do not understand what may be happening. Any idea?


Thank you very much for your collaboration.


RD


Prosjek ocjena: -
In reply to Roger Domínguez Argemí

Re: Redirect to HTTPS

napisao/la Pau Ferrer Ocaña -
Slika Core developers Slika Moodle HQ Slika Peer reviewers Slika Plugin developers

Hi Roger!

I hope you're doing well! I'm not an expert on that field but I think username parameter is missing because POST fields are not being received by Moodle. Probably redirection is not considering post fields. You should follow the data sent and check where POST fields are missing.

I hope this helps you to solve your problem namiguje

Salut!

Pau

In reply to Roger Domínguez Argemí

Re: Redirect to HTTPS

napisao/la Dani Palou -
Slika Core developers Slika Moodle HQ Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Hi Roger,

please take into account that, if no protocol is provided, the app will always try to use https first, I'm not sure if that's related with the issue you're facing.

If you send me your site URL to mobile@moodle.com I should be able to tell you exactly which URLs are being called.

Kind regards,

Dani