Question

I'm sad to have to ask this question, but I'm not even sure of what to call what I'm trying to do, so Google isn't much help.

I'm doing some work on a company website from outside the company's network. Some of the assets on the site are loaded from a domain that is only visible from inside the company's network (QA) but there is a mirror of those assets on a public domain. How can I mask or forward requests to this internal domain (e.g.: http://qa.example.com/image.png) to the mirroring external domain on my laptop? (e.g. http://www.example.com/image.png). This is similar to what can be done using the host file for IP addresses. The reason I want to do this is so that the images aren't broken as I work on the site outside the office, and changing all the references in the web files is not an option. I'm on OSX Lion.

Again, sorry, dummy question, please don't flame :S

Thanks!

Was it helpful?

Solution

If the mirroring host (http://www.example.com) doesn't use host headers, you can do it through the host file, by mapping qa.example.org to www.example.com.

This will have your browser ask the www.example.com host for the http://qa.example.org/image.png. If www.example.com is configured to use host headers to control content served it will see the mismatched hostnames and fail to serve the content. In that case you need something more powerful.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top