Quick tip for testing multisite on XAMP
Submitted by tao on Thu, 2008-09-25 14:16.
I don’t believe I didn’t know this all these years. You can edit windows host file at C:\windows\system32\drivers\etc\hosts, and add entries of the form:
127.0.0.1 foo.localhost
127.0.0.1 bar.localhost
Tip of the hat to wulff over at http://drupal.org/node/24454
hosts file
you can use it to “fake” any domain. for example
127.0.0.1 doubleclick.com
some people use this method to block advertisements from known ad servers.
it’s also handy if you just changed dns settings on your domain, and you don’t want to wait.
Drupal documentation
http://drupal.org/node/166831
http://drupal.org/node/32715
/etc/hosts on *nix
or edit the /etc/hosts file if you are cool enough to use *nix
I tend to use: 127.0.0.1
I tend to use:
127.0.0.1 dev prod domaintest newsiteThat’s on OS X in /etc/hosts. Not sure if that syntax (all on one line) would work on Windows.
Yeah
I like to route 127.0.0.1 to example.com on localhost. That works too.
127.0.0.1 example.com
127.0.0.1 foo.example.com
Very handy when your code needs to test against the TLD string (.com|.net|.org).
- agentrickard