Nix that pesky “Incorrect access detected, this server may be accessed only through “http://your.site” address, sorry”

8191

error

Post Pages - Post Inline - WIRIS

Does the above look familiar? It’s caused because a Moodle install is set to recognize only one specific URL as it’s direct URL. While the above is only a minor inconvenience (you are sent to the right page in a few seconds by default) you can eliminate this page by changing only one character in your Moodle code. I found the solution at Moodle.org in this forum, the solution was posted by Daniel Garcia Sanchez.

Note that this requires you to edit your lib/setuplib.php file, you will need access to edit these files: The code on my Moodle (2.5.1) was line 805 (give or take). Changing the 3 to a 0 eliminated that screen so that users weren’t confused when visiting the site.

Handy!

solution

 

3 COMMENTS

  1. useless,

    best way is to edit confug.php and type correct adress.

    or if u want only to disable message use way described above.

    Regards.

  2. Far from useless. Some of us have both external and internal site names, or server naming schemes which are already fixed for automatic NTLM authentication via kerberos and CNAME records in DNS for the actual application addresses. In which case, moodle doesn’t actually offer me a way to make it work since I require, actually REQUIRE the moodle to respond to more than one URL. Since moodle doesn’t make this possible, this far from useless tip is very handy.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.