Windows 7 hosts file issues

Until recently my operating system was XP where for the
purpose of development and testing of php and zen cart I set up xampp that included
apache http server and mercury mail server I also made changes to

C:\Windows\System32\drivers\etc\hosts

as follows:

127.0.0.1 mydomain # For browser access
127.0.0.1 mail.mydomain # For email access
127.0.0.1 mydomain # For mercury mail server

This allowed the use of mydomain in the address bar of my browser
rather than ‘localhost’ and mail.mydomain to access email via thunderbird. All was well.

Then I installed windows 7, I made all the mods and again everything
appeared to run as expected.Then I turned off my wireless modem
causing all working local connections to fail. Localhost in
the address bar still works but not mydomain and thunderbird
cannot find mail.mydomain’.When I restart the modem all works again.
Is there some way to overcome what ever is causing this as I would like to continue working ‘offline’
I have searched many other forums to no avail it is not a 64bit vs 32bit issue
as I have 2 machines running with both versions of OS producing the same result