Issue with proxy to a React app

Hello everyone,

I have a single page React app running on Netlify at this url:

As I needed some static marketing pages I decided to build them with Gatsby on a separate app running on Netlify at this url:

Now I’d like to have the React app proxied on a subfolder of the Gatsby website. Something like this:

So on the Gatsby site I created a _redirects file (inside static folder) with this content:
/editor/* 200!

Unfortunately the proxy doesn’t work. I only get a blank page with a bunch 404s. What am I doing wrong?
Link to proxy

Thanks for your help!

It’s probably because the content from your is getting redirected to, but, the CSS, JS content is located at and thus, they’re unaffected by the redirect rule as it only targets /editor/*. You’d probably have to make the files relative to the /editor/ directory and not relative to the domain.

I’m confused.

Let’s assume i want this situation: to show content from

If I understand correctly I just need to write a _redirects on siteA with the following:
/editor/* 200!

Now this is not working as the page is looking for assets in that are simply not there. What am I missing here?

If you check the source of your webpage at, you’ll understand the situation in a better way.

The problem is, the assets in the source website (that is, zwiftworkout) are linked relative to that domain. So, when you are redirect from elegant-jeggings to zwiftworkout, you’re just rendering the contents of the page at zwiftworkout on the elegant-jeggings page. Since the URL in the address bar of the browser is elegant-jeggings, the browser is looking for those relative files in elegant-jeggings domain, which, don’t exist.

I would suggest to switch to absolute URLs as they would make it much easier. You don’t even need to do anything, just enable assets optimization for your websites and Netlify should take care of the rest.

That’s wonderful. Enabling asset optimisation did the trick!

Thank you so much!

1 Like