I'm not even 100% sure how to ask this question. The answer might be out there, but I can't find it.
So I've set up virtual hosts for my Mac and I do all my development locally on my computer. I have a vhost
folder in my Sites
folder, and I have a list of folders, such as:
recipes.cam
database.cam
sandbox.cam
codeigniter.cam
and in my /etc/hosts
file I have an entry for each one:
# vhosts
127.0.0.1 recipes.cam
127.0.0.1 database.cam
127.0.0.1 sandbox.cam
127.0.0.1 codeigniter.cam
# ...
And this works great. When I go to http://recipes.cam in my browser, it shows the contents of the ~/Sites/vhosts/recipes.cam
.
So this is my question: Is there a way to have any address that end in .cam
to redirect to localhost? So I don't have to create a new entry in hosts
every time I add a new directory (it happens pretty often).
I tried 127.0.0.1 *.cam
in my hosts
file, but it didn't work :-/