Subscribe to our feed

Symfony Experts

Symfony Experts
If you have an urgent question for a symfony-related issue, this is the place to ask.


Stack Overflow

The old fashioned way


  Archive for October, 2007

October 1, 2007 – 1:38pm Prevent DNS Servers from redirecting local requests

When I start work on a new web project I usually create a new virtualhost on my development machine so that I can access a local version of the site at something like http://myproj/ instead of http://localhost/~myusername/myproj. I use a nice little shell script written by Patrick Gibson called that handles this task on OS X. One little snafu I run into depending on my ISP is that their DNS servers will sometimes capture my local request to the domain name and try to redirect before my request even hits my local server. To fix this, you have to edit your local hosts database. Open up /private/etc/hosts and add a line like:       myproject

Now, any requests to http://myproject/ should be recognized as a local host and your DNS servers will no longer redirect you.

Posted by in  OS X Web Development   |  Comments Off on Prevent DNS Servers from redirecting local requests