1
1 Comment

Proxy subdomain content to subdirectory on root domain? Is this even possible?

Hey!

Sorry, bit of a technical question here, but I'm sure others have encountered this as-well.

I have a site. Right now the domain structure looks like this:

mysite.com => landing page w/ unicornplatform
blog.mysite.com => ghost blog
widgets.mysite.com => micro-tools built w/ React & embedded as iframes in root
docs.mysite.com => help center on engine.so

I want to re-arrange the structure so it's like this:

mysite.com/tools/<any> => proxy content from widgets.mysite.com
mysite.com/blog/<any> => proxy content from blog.mysite.com
mysite.com/docs/<any> => proxy content from docs.mysite.com
else: proxy content from my current landing page

And for some reason this is very very challenging. I'd assume I could just setup a reverse proxy, but there's SSL and relative links and whatnot that always break. Why is this so hard and is there any solutions (even paid ones)?

on September 26, 2022
  1. 1

    Many CDNs provide URL rewriting facilities, which I suspect could mostly solve this. The relative links one is tricky though, using a <base> tag might help, but might also break other things.