You installed WordPress locally with XAMPP. Now you can’t figure out why your browser is redirecting http://localhost to http://www.localhost.com. This might happen when you first install WordPress locally or sometime down the line after a computer restart or something.
Most likely, you just need to start Apache and MySql. How? Go to the ‘xammp’ folder in you C: folder and double click ‘xammp-control.exe’. While you’re at it make a shortcut for that executable on your desktop. That will bring up the XAMMP Control Panel Application. Press “Start” for Apache and MySql.
Now go back go your browser and play with your local install of WordPress!