Nix that pesky “Incorrect access detected, this server may be accessed only through “” address, sorry”



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 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.