Problem
When trying to rewrite from a Netlify site to another Netlify site powered by NextJS, resources fail to load in with a 404, due to _next/static
being searched for at the root.
Other Details
I have many NextJS projects I’d like to link under the main domain, so the subdomain /wrapbattle/
must stay, and I’d like to be able to create others e.g. /next-app-1
and /next-app-2
, etc
_redirects
/wrapbattle/* https://trusting-feynman-221b13.netlify.app 200!
Thanks!
perry
March 2, 2022, 6:59pm
#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 Reviewed By Netlify Support Staff December 2022
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 corr…
if not, please post again, and we’ll try and troubleshoot.
Hello there, I have the same issue. Did you find the solution? @bramses
Hi @mrcportillo ,
Please share your site’s URL, so we can check.
Nevermind, found your post here:
Site 1: https://development--splunk-show.netlify.app/
Site 2: https://development--show-admin.netlify.app/.
Hi there, I have two nextjs apps deployed on Netlify. I’ve added a rewrite rule on the site 1:
[[redirects]]
from = "/admin/*"
to = "https://development--show-admin.netlify.app/:splat"
status = 200
force = true
The rule is working, whenever I navigate to the /admin path the site 2 document is fetched, but, the statics files that site 2 requires are being searche…