If I use foo.my-company.com
at work, then all works well, but if we fix any bug remotely, then the web server will respond with a forbidden.
I heard we can use dev1-foo.my-company.com
at a remote location, and it is the same site, but if I access that, I found that all the AJAX are still done to foo.my-company.com
and it won't work because it is still forbidden. It seems that "hosts file" can be used to overcome this, but how specifically?