Fix the settings externalpage URL

Without this patch, the URL works only if the Moodle is installed in the root directory of the domain.