Redirect proxied website

We have two sites on Netlify, one that proxies the other, but I want them to always use the proxied path.

Currently there is a redirect like the following on

# _redirects for

/othersite 200

This works fine, but someone can still go to and browser around as such. How can I add a redirect to that makes it so it takes you to without causing an infinite redirect loop?

Hi @jclusso

It is entirely possible to redirect to using a domain-level redirect. However, having this in place while proxying as you are causes the proxy to fail as the proxied path is also the endpoint of another redirect.

I know this and that is the problem I’m trying to solve… Are you saying it’s not possible to solve?

I don’t believe there is any officially supported workaround for this.

Hi @jclusso,

I believe this has been responded to in the helpdesk.

For others coming to this, the “easier” solution might be to use JavaScript to check and redirect using location.href.

1 Like