Obfuscate URL path to Moodle subsite

207 Views Asked by At

I have a Drupal site and a Moodle subsite within Drupal.

At the moment, the URL structure to access Moodle is as follows: www.mydrupal.com/moodle

I don't want users going directly to Moodle when they return, i.e. they always have to access Moodle via a link in Drupal. This helps to set some essential session variables.

So, is there a way to obfuscate the Moodle part of the URL - like a sequence of characters which is altered at regular intervals? i.e., www.mydrupal.com/owhefihewhf

I want to use such a measure to discourage bookmarking the Moodle part of the site. Can anyone recommend such a solution?

1

There are 1 best solutions below

4
On BEST ANSWER

Changing the URL of your moodle regularly would involve updating the moodle database each time you change the URL.

The easiest workaround which prevents the mentioned case above (bookmarking) would be an page, which includes moodle using an Iframe, like (www.mydrupal.com/learning). So the actual moodle URL would not be visible to the common visitor. The mentioned page can check if session varaibles exist, if so, show iframe, otherwise redirect to Drupal/Loginpage.

Another option would be having an own authentification plugin in Moodle, which will either user Drupal authentification for a SSO, or at least check if your session variables are set.