Search code examples
phpwindowswampwampserver

WAMP Server redirects to localhost from ip address


Before Click Moodle Folder in WAMP Server 3.0.5

In this picture you can see my URL is 192.168.1.150, If i click on the moodle folder listed in the Index URL becomes localhost.

I am using WAMP 3.0.6 on windows 10. what i want URL as IP not want to direct to localhost. because when i am click from another network computer that is also same problem.

After click on moodle folder


Solution

  • Its because of $CFG->wwwroot in your config.php file. If you dont want to redirect set your ip to this variable .Example:

    $CFG->wwwroot   = 'http://192.168.1.75/moodle';