WAMP localhost redirect fix in Windows 7 Beta
As the title indicates, I am going to share with you what I had to do just yesterday after installing WAMP Server on my laptop where I run Windows 7 Beta Operating System. Honestly I never experienced this kind of trouble ever before but strange things happen regularly as we face technology on our day-to-day basis.
A little story first. I had WAMP services all running smooth and sound, however, whenever I typed http://localhost on any browser in my system, it returned a Page Not Found result. I was still able to access my local web server using 127.0.0.1, but then when it came to loading WordPress locally, no stylesheet was loaded and the page layout was totally naked. I may just assume that could also be tweaked by altering WordPress address (URL) in Admin –> Settings –> General page, but I preferred the standard approach so I had to dig deeper.
If you ever happen to encounter the same issue then keep following me till the end of this explanation.
In every Windows OS there are two files, one called lmhosts.sam and the other hosts, lying deep inside C:\Windows\System32\drivers\etc folder. Of course that differs for Windows NT editions, simply replace C:\Windows with C:\WINNT. Now lets get back to our task. I needed to tell Windows to consider localhost as I’d have entered 127.0.0.1 on the address bar. Hence I went and opened the hosts file in Notepad (you can use any text editor for this). All you have to do to fix the problem is go to the end of hosts content and make sure whether there is a line like this
127.0.0.1 localhost
If false, then type that in, just be sure to leave a space between the 127.0.0.1 address an localhost.
For some particularly strange reasons, after I did that WAMP still hesitated to work. So I pasted that into lmhosts.sam file too and the spell was gone.
Note: Keep in mind that normally these two files should already be configured by default once you install Windows, but this case is specific to Windows 7 Beta, therefore it’s not that strange to not be that way.
Did you experience such a problem? Were you able to fix it? Tell me your story, I’d be glad to read it.


Hello,
I’ve read your post about fixing the localhost problem on windows 7 beta, but unfortunately it doesn’t fix my problem.
The Hosts file has the line #127.0.0.1 localhost, so does the lmhosts (after i’ve edited it) but still i can access my localhost only by typing 127.0.0.1
Maybe i’m doing something wrong?
I’m looking forward to your reply.
S.
Saulius, I guess you have to add a new line with the 127.0.0.1 localhost and make sure it doesn’t have a ‘#’ in the beginning. That is used to comment a line, so basically the system will ignore it as it consideres that a comment and doesn’t interpret that.
After that reboot it may just be worth doing sometimes.
Let me know if you manage to come out right with it. ;)
Thank you very much, from Chile
fix my problem.
marcelo reading your comment just made me happier. Glad this helped.
This has fixed my problem as well.
Thanks buddy.
I install Skype and change lmhosts.sam . wamp and localhost come. Then rechange lmhosts.sam. but all are ok. please tell me how are skype worked?
@Meshach I’m glad, you’re welcome.
@sumon when you have Skype running and then you lunch WAMP, the Apache service won’t start successfully, that because Skype takes ownership on Port 80 which is the default port for the HTTP protocol that Apache uses.
In such case, you either shut down Skype, and restart WAMP Services, or you have to manually edit the Apache configuration file called httpd.conf which can be found in this path: C:\wamp\bin\apache\Apache2.2.11\conf
Hope that helps.
This fix my problem, thaks a lot for your information from Mexico
Regards
Thanks so much! I was going crazy over this, and this was the only website I found with a clear answer! Nice work!
I only had to add it to the hosts file btw.
If Wamp wont fully restart, make sure Skype is fully turned off before starting Wamp.
Thanks Arian! WAMPSERVER 2.0 works now in my Windows 7 Beta.
the interface of Windows 7 is great but in my opinion Windows XP is still a very solid and stable operating system. Right now, I would never give up XP for Windows 7.
I’m generally not the kind of person to post my opinion on other’s blogs, but for your post I simply needed to do it. I have been browsing in your blog a lot recently and I am really impressed, I think you could potentially emerge as the main voices for your market. Not sure what your load is like in life, but if you started commiting more effort to posting on this site, I would guess you would begin getting a mass of traffic eventually. With ads, it might emerge as a great second revenue source. Just a concept to think about. Good luck!
Hey Oswaldo,
I’m in a position where I’m wondering whether you wanted to say this words to me or you thought you have the window of another blog open.
Nevertheless, I admire the fact that you took the time to address to me with your advice, I really appreciate it.
I am constantly trying to raise my level of commitment to this blog. Thanks.
I would like to exchange links with your site wp.xhezairi.com
Is this possible?