So I have an offline website on my PC that I want to test in Firefox. I would like to do it in the offline mode.
The problem is, I have defined a virtual host for the website in httpd.conf Apache configuration file like this:
<VirtualHost 127.0.0.1>
DocumentRoot "D:\data\o\WebProjects\website\public"
ServerName website
</V开发者_Go百科irtualHost>
When in online mode, I can go to http://website/ and test it normally. However it does not work in offline mode. Any hack around this?
I don't think in offline mode FF will bother to open any TCP connection (not even so with localhost). Try opening http://127.0.0.1 in offline mode. If it fails then no chance.
Did you try to put the URL in hosts file?
127.0.0.1 localhost www.xyz.com
The host file, in Windows, is in C:\Windows\System32\drivers\etc, while in Linux it is usually place in /etc/hosts.conf.
精彩评论