I'm trying to figure out how to do something, and I can't quite seem to get it to work. Let me describe the situation:
Using a hosts file, we redirect the resources (CSS/JS/etc) of a website, let's say
blah.website.com, to our local machine
We then can do some development on any JS/CSS/etc on our local machine. Let's say the only change we do is making the
This allows us to see our changes to the website,
blah.website.com without messing with anyone else's view. Only our computer can see the green background when we go to
blah.website.com; if anyone else goes there, they don't see it. E.g., if a resource,
the.css on the website is located at
blah.website.com/the.css, we can have our own version of
the.css on our local machine somewhere (
127.0.0.1) that is loaded instead (assuming I've set up the hosts correctly, which I have).
Here's where my problem comes in: I want to be able to see these changes on other devices, such as a phone. That is, when I go to
blah.website.com on a different device, such as my phone, I want to see the green background. Note that I want to do this without changing the files on
How can I do this? (Please note: I have to develop on OSX :P)
Steps I've taken: I've tried sharing internet with the phone (have my laptop broadcast WiFi that my phone can connect to), however, despite the laptop being able to see the green background, my phone can't. It seems the phone ignores the hosts file on the laptop, even though the laptop is what is supplying the internet.
Thanks all :)
Also, I'd like to clarify:
Only our local machine (let's say our laptop) has the changes. The server and the second device (let's say our phone) do not have the changes. Ideally, no changes should be made to the second device (e.g., the second device's hosts file) in order for it to see the green background. That is, the second device should just connect to the laptop or something like that and be able to see the changes as well.