We’re trying to configured a Netlify Internal Redirect that looks like this:
/pals/join/:splat https://pal-signup-web.netlify.app/pals/join/:splat 200
This appears to work until we deploy code changes to the destination site - the changes aren’t appearing. They’re appearing if we visit the destination site directly, though.
Source site (with redirect enabled):
Is it acquiring the assets from the source site (the destination is currently a copy of the source app)? If so, is there a best way to redirect for these as well?
200 redirect returns the destination content without changing the URL/path shown in the browser address bar.
If you wish to change the visible address, you will need to either redirect with a
Thanks for the reply @coelmay, but an internal redirect is what I want. It’s redirecting to the destination correctly, but the destination is getting its assets (in this case, css files) from the original site; my goal is to make the destination React app get its css files from itself instead of the app it was “internally redirected” from.
Just noticed the rule
is not correct.
/pals/join/* https://pal-signup-web.netlify.app/pals/join/:splat 200
However I shall add:
When using a proxy, the page/site proxies to (in this case
/pals/join) becomes a path of the site proxied from, such that any asset (images, stylesheets, scripts) are loaded from the site proxied from, not the site proxied too.
So if the page
pal-signup-web.netlify.app/pals/join/ has an asset
/styles/main.css and this page is accessed via a proxy at
joinpapa.com/pals/join/ then the
/styles/main.css is loaded from
pal-signup-web.netlify.app because that is where the page is accessed. The result in many instances is missing styles, images, etc. One method to get around this is to add
<base> to the site proxied to so that all assets load from the original domain.
I do note that
<base> set, but it is to a preview URL e.g.
https://XxXxXxXxXxXxXxX--pal-signup-web.netlify.app/pals/join instead of
This was it; things started to come together once we fixed the redirect rule like you suggested. Thank you @coelmay!!