Forum Moderators: mack
I am running WinXP, IIS, & IE 6.0
I am developing my website offline on my PC (C:\Inetpub\wwwroot etc.). Under Tools > Internet Options > Connections, my IE Connection is set to 'Always Dial my Default Connection'.
However when I click on a link to somewhere in my site (still 'local', not on the Net) an Internet Connection prompt fires up and suggests I connect to the Net or work offline. I click 'Work Offline' but every subsequent link in my offline website prompts me for an Internet Connection.
Have I missed a setting somewhere which will allow me to browse my website on my local PC (no need to connect to the Net whilst developing) but will also enable me to connect to the Net when I need to log into a forum, for example?
Many thanks,
Andy
Be sure this line is in your hosts file:
127.0.0.1 localhost
If it is, try surfing with:
[127.0.0.1...]
Turn off autodial:
Control Panel>Network & Internet Connections>Internet Options>Conntections Tab>"Never Dial a Connection"
This line is in my hosts file (C:\Windows\System 32\Drivers\etc):
127.0.0.1 localhost
Should there be another/different hosts file?
I also have (in the same location) a lmhosts.sam file which is empty - does this need a similar line?:
127.0.0.1 localhost
I can turn off Autodial & browse locally fine but how do I then connect to the Net when I need to browse? I get 'Page Cannot Be Displayed'.
Surely there must be a way to browse locally offline (localhost), and then when a Net connection is required click 'Connect' on the dial up prompt ... (?)
Thanks,
Andy
Keep default connection property as Never Dial etc. but have a separate shortcut to force a connection when needing to connect to Net.
Strange solution but it works!
Am still curious as to why this isn't working how I'd expect it to though ...?!
As you said, "Never dial" setup is a solution.
But the problem I had with the "Never dial" setup (on W2000) is that sometimes your browser will not refresh the page you have just modified and then you need to force it to refresh. Quite annoying!
For website banners, logos, and other stuff linked to WWW, I have a switch file (0 or 1) and type all my script with if ($switch=="value") statement so that it does not show the www elements in my localhost.
It is slighlty longer to script but the great thing about the switch is that it works fine both on localhost and online. You can even have different useful variables (such as $_SERVER['DOCUMENT_ROOT']; for example) for each switch.
Tommy
I am using XP
Then don't bother with creating a shortcut on the desktop (as skipfactor suggested) just use the existing Start Menu -> Connect To item instead.
(If you don't have this item then right click on the Start Menu, select Properties, then Customise.. Advanced.. and check the "Show Connect To" option)