Hi
I would like to reverse proxy a few sites for geo location reasons (I don’t own the final domain). I thought it would be as easy as setting up proxy pass on a domain I own with the location pointing to the target domain and while this works for the homepage, as soon as I click a link it starts being served from the target domain.
I’m sure I’m doing something obviously wrong!
I was going to setup a VPN and route traffic depending on rules but my unifi usg doesn’t seem to support “URL” based routing. I could setup *sense and remove my usg, but that would make me a little bit sad.
You need to replace all links on the page and catch redirects.
Nginx can do it either via sub_filter or with Lua (if it’s compiled with it). I use something similar to this: