How to set up wildcard subdomains in the hosts file

You can’t use wildcards in the hosts file either in Linux or Windows, but you can set up a real domain that points to for example here is one that is already set up this url points to and all you need to do is get your server configuration file to handle as the domain for your apps. Now any subdomain of will go to your machine when you are testing and you can use urlrewriting to handle the subdomains differently or use routes in rails or a url config in django.

This entry was posted in Uncategorized by admin. Bookmark the permalink.

Comments are closed.