Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have share my wamp over my personal LAN . (Server IP : 192.168.0.100)

When I am trying to access wamp server it's working perfectly. But when I open website hosted on server using client machine (192.168.0.103) , it doesn't load CSS - Images and JS files. So I saw console and found that my browser is trying to load :

localhost//mysite/css/style.css

And failing to load resource. now when I try to load the same resource directly from browser using

192.168.0.100/mysite/css/style.css

It's showing me css file ! Now I am confused how to solve this problem so that my browser load that css perfectly !

Please help me ! thanks in advance !

share|improve this question
    
If it solved your issue, why are u removing answer mark? –  burninggramma Nov 20 '12 at 21:53
    
Ohh.. wtf happens to my answer acceptance ! I didn't ! –  Hardik Thaker Nov 22 '12 at 2:38
add comment

closed as off topic by Michael Hampton, rnxrx, HopelessN00b Genius of network, RobM, SvW Oct 28 '12 at 0:20

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 2 down vote accepted

Its working just as it should. If the browser reads some include directive with "localhost" it tries to look up that file in your current computer ( if localhost is set to 127.0.0.1, and default it is ). So you should change the path of those files in your html, to a relative url, like: css/style.css. This will work if that html page is in that directory where the css/style.css can be found.

share|improve this answer
    
Yeah.. thanks I found and fixed that issue.. thank you so much !! –  Hardik Thaker Oct 27 '12 at 16:46
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.