How to setup rewrite from a nextjs project to nextra blog site? #2988
Unanswered
kunaljain0212
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey folks!
I have a Next.js website hostel on a domain let's say https://domain.com and a product release website built using nextra hosted on https://releases.domain.com.
Now I want to add a rewrite such that https://releases.domain.com and all sub routes are available on https://domain.com/releases*
This is what the current rewrite looks like:
But with this current setup, no CSS/static assets work, and all I see is a broken website without the required CSS or JS being fetched.
From the networks tab I am able to figure out that when I load https://releases.domain.com the CSS file required is fetched from
https://releases.domain.com/_next/static/css/c5c3ea6ba6c3cfc3.css
, but in the rewrite setup when I try opening https://domain.com/releases it tries fetching the same CSS file and other assets fromhttps://domain.com/_next/static/css/c5c3ea6ba6c3cfc3.css
, and this results in a 404 for that file.Can someone please help me out with respect to what the rewrites should be to fix this issue?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions