Blankman
Blankman

Reputation: 266978

Setting up fake URLs locally that support subdomains

I'm developing a Rails 3 app locally on my Mac. I want to test it locally with fake URLs that support subdomains, e.g. http://blah.example.com and http://blah2.example.com. How can I set this up?

Upvotes: 2

Views: 587

Answers (1)

user142019
user142019

Reputation:

Run from your favorite shell and terminal:

sudo nano /etc/hosts

Add this in a new line:

127.0.0.1    *.example.com

Press Ctrl+X to save.


Make sure you do NOT delete the lines that are already there!

Upvotes: 8

Related Questions