开发者

localhost and IP Address issue

开发者 https://www.devze.com 2023-02-12 07:01 出处:网络
I h开发者_StackOverflow社区ave this irritating problem on my web development. I have an issue regarding the usage of http://localhost and my IP address http://10.xxx.xx.x. If I access my website using

I h开发者_StackOverflow社区ave this irritating problem on my web development. I have an issue regarding the usage of http://localhost and my IP address http://10.xxx.xx.x. If I access my website using my localhost which is also 127.0.0.1, it renders good, but when I access it on other workstation, the rendering is really bad. So I tried to use my ip address, then it looks the same as what the others can see. As a developer this is the first time I encountered it because this is my first time using ISS web servers. I really dont know if it is an IIS problem or is it just me. hehe.. One thing also is Im using a server side program which Im updating and it seems that when I use my ip address, the update has not been displayed. It would took a day or two to update it. Is there anyone here experience the same problem and fixed it. Or is there any IIS guru's here that can help me. I really dont know what to do. Im having an inconsistent website. :(

Thank you in advance.


Check through all your HTML and check all URLs that point to resources within the site. Make sure they start with / instead of http://localhost/ or http://127.0.0.1/. For example, replace http://localhost/images/logo.png with /images/logo.png

It would be great if you could add more details to your question. Also, you might try using the Firebug extension for Firefox to determine if any stylesheets, images, or scripts are failing to load.


Yes, i experience this problem all the time, after digging, it turned out to be a problem with my ISP, they cache certain files according to ip address... so to get over it in development mode (debug mode) i add a random number to all my css and js files (/styles/ui.css?34), i do that programmatically so that i dont have to worry about it, when im done, i fix the version and turn debug off on live host

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号