Fun with the windows host file
Does apple.com use apache? It does on my PC.
If you want to use a domain on your PC instead of localhost, your windows host file is the key.
On XP or Vista, go to c:windows\system32\drivers\etc and open the host file. This file has no extension so don’t let that trick you. With vista you will have to edit this file with admin privileges.
At the bottom of this file, it should look like this:
127.0.0.1 localhost
On the next line, simply add:
127.0.0.1 apple.com
Now any url on your local xampp or apache install can be accessed by your new url.
Since it starts with 127.0.0.1 your environment does not try and find the real apple.com.
This is great for screencasts where you want to emulate running in a live environment.
Pass this tip onto a friend!
Related posts:
- Install WPMU on localhost with Xampp tweetmeme_url = 'http://mattkern.com/fun-with-the-windows-host-file/'; I recently wanted to install WPMU...
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.





Comments
No comments yet.
Leave a comment