I am limited to 4 links here as a new user so I’m purposefully making some of these links not work so I can post. I’m not sure whether my issue today has anything specific to do with the fact that I’m using two Hugo sites, as I was able to successfully do a 200 rewrite from this netlify site (rmarkdown-docs.netlify-dot-com) to this url just fine: rmarkdown.rstudio-dot-com/docs/
Here are the four relevant links:
- My primary site: education.rstudio.com
- My secondary site: https://rmd4medicine.netlify.com/
- A rewrite from the first to the second that fails: https://education.rstudio.com/medicine/
I have a custom domain associated with an existing Hugo site deployed via Netlify, and would like to have a rewrite redirect that directs users to another existing Hugo site deployed via Netlify (same team). The rewrite redirect bit is critical for me- I do not want users to ever be exposed to the
*.netlify.com url in their browser.
Here is an example test from my redirects file:
/medicine/* https://rmd4medicine.netlify.com/:splat 200!
This rewrite results in broken assets in the secondary site when left “as is”. I can fix this in the rewritten link by changing the
baseurl in my secondary site, but this change breaks the linking of the assets in the netlify site. Can I have both just work using a rewrite redirect? I would like to change actual code and Hugo layouts in the secondary site as little as possible for this work.