UlysC
May 11, 2021, 11:04am
1
Hello,
Site 1 : https://repro1.netlify.app
Site 1 repo: GitHub - UlysC/ntl_repro1
Site 2 : https://repro2.netlify.app
Site 2 repo: GitHub - UlysC/ntl_repro2
I’m trying to redirect /two/
prefixed urls from site 1 to site2’s functions like so :
Site 1 netlify.toml
:
[[redirects]]
from = "/two/*"
to = "https://repro2.netlify.app/.netlify/functions/:splat"
status = 200
force = true
https://repro1.netlify.app/two/myfunc returns a 502
https://repro2.netlify.app/.netlify/functions/myfunc returns 200
as expected
Is this not supported or am I doing something wrong ?
info: It’s worth noting that the redirect works when using ntl dev
Also, redirecting to any other file contained in Site2 that is NOT a function works.
perry
May 11, 2021, 7:33pm
2
hi there, before we dig in, did you see this brand new guide on debugging redirects?
I strongly suggest you give it a thorough read through and see if this fixes your problem:
Last checked by Netlify Support Team: September 2023.
Introduction
You’ve put blood, sweat and tears into building an incredible static site with all the bells and whistles. However, you’ve configured some redirect rules and you’ve come unstuck… they don’t appear to be working!
Ensure you’ve followed the correct guidance
Our redirects and rewrites document covers a broad range of use cases, from status codes to proxying another service and everything in between.
Ensure you’re using the correc…
if not, please post again, and we’ll try and troubleshoot.