0

Application is working perfectly fine on localhost. But I'm trying to access my wamp server through Lan on some other machine, I can successfully see the page but when ever i try to click on any link it replaces the IP address with localhost, due to which can access.

enter image description here

When i click on any link: enter image description here

When i hover on any link: enter image description here

Awn Ali
  • 1,361
  • 1
  • 17
  • 31
  • It seems that something is wrong in your application's configuration that you are using. This is not related to wamp. – Ahmad Sep 06 '15 at 12:14
  • 10.0.12.250:8080/ even this is redirecting to localhost. – Awn Ali Sep 06 '15 at 12:19
  • Maybe the application is redirecting? – Ahmad Sep 06 '15 at 12:21
  • application is running perfectly fine on deployment machine but when i try to access it from any other machine on LAN, it is showing me this error. – Awn Ali Sep 06 '15 at 12:31
  • Wamp has nothing to do with links or redirection. I think there is a setting in that application that sets localhost as the domain for the site. When it sees that the domain in the url is different, it redirects to the domain, that is localhost. You have to change that setting. – Ahmad Sep 06 '15 at 12:42

2 Answers2

1

Your problem is not related to wamp. Your network config is correct. Probably the problem is your links path. Try to use correct path with Yii::app()->baseUrl. Try to use this at the beginning of every link. This can be an example for link path:

<a href="<?php echo Yii::app()->baseUrl. '/controller/action' ?>">Test</a>
hamed
  • 7,939
  • 15
  • 60
  • 114
0

I got it working by following step:

There is a file in app\protected\config with name perInstance.php $instanceConfig['components']['request']['hostInfo'] = 'http://localhost:port';

change the localhost to your static IP.

Awn Ali
  • 1,361
  • 1
  • 17
  • 31