Local development and subdomains
Hi,
did you ever wanted to work with real domain names and subdomains on your local machine?
It's easy, just create a file named .proxy.pac
with:
function FindProxyForURL(url, host) {
if (shExpMatch(host,"*.<YOUR_DOMAIN>")) {
return "PROXY localhost";
}
return "DIRECT";
}
Now go to your Firefox and open Preferences > Advanced > Network > Settings... > Automatic Proxy Configuration URL
and put:
file:///PATH/TO/.proxy.pac
And that's it! It can work with other browsers (didn't test it myself).
Source & credits: Stackoverflow
Written by Hélder Duarte
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Development
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#