Redirect with SvelteKit App Not Working

PLEASE help us help you by writing a good post!

My Netlify site name is je-labs-main.netlify.app

I’m building an app in SvelteKit and want to use a reverse proxy to load a subpath of the app to a different domain.

I’ve already read through Netlify’s Support Guide on debugging redirects and everything is hooked up correctly.

I’m trying to reverse proxy je-labs-main.netlify.app/labsl/friendsgiving to load when visiting friendsgiving.rsvp

I tested the reverse proxy with a different web app and the domain and it worked fine
https://friendsgiving.rsvp/* https://example.com/:splat 200!
even friendsgiving.rspv/about loaded example.com/about

But when I switch this out to be:
https://friendsgiving.rsvp/* https://je-labs-main.netlify.app/friendsgiving/:splat !200

Nothing loads.

Note: These domains are both setup under the same Netlify project.

I’ve tried almost every variation of this proxy I could think of. I even spun up another instance of the app, and tried to redirect to it. But for some reason, the friendsgiving.rsvp url just adds the path friendsgiving.rsvp/labs/friendsgiving and still doesn’t work.

Is there a bug? Am I doing something wrong??

Meant to add:

x-nf-request-id: 01HG46PNK4D7MCXASV7RQ3NPZ3

Have you tried separating the friendsgiving.rsvp domain to a different site?

Yeah, just tried it again, and still no luck.

Was able to get the friendsgiving domain to work on its own (building and deploying it as its own site), but then adding the redirects just causes a 404 error, and the url automatically appends /friendsgiving for some reason?

That /friendsgiving is coming somewhere from your SvelteKit config. It has this header:

image

So looks like SvelteKit is doing something that you don’t expect it to, but what that is, can only be answered by SvelteKit itself.