Accessing a site via localhost instead of IP

How do i set it up so my php files in my sites folder can be viewed with just the command


instead of the default

the bottom one works fine but where do i need to change it so in my browser i can just enter localhost


check your /etc/hosts; it should have an entry localhost. then you can just use http://localhost/. you can't just use localhost/ because that is not necessarily http and your browser may interpret that as a search or something.

Need Your Help

View source in iOS Simulator?

ios ios-simulator

Does anybody know of a tool where I can inspect the source code of a site in Apple's iOS Simulator? Something like Firebug or the Chrome Developer Tools for this would be great, and I haven't found

UnicodeEncodeError: 'ascii' codec can't encode character u'\u2026'

python python-2.7 unicode beautifulsoup urllib2

I'm learning about urllib2 and Beautiful Soup and on first tests am getting errors like: