I’m using a splat rewrite to pretend that the app on artis-dev-2-cms.herokuapp.com/ghost
exists on new.artis.dev/ghost
.
With the Netlify splat rewrite below everything works perfectly as long as the URL contains the trailing slash exactly like new.artis.dev/ghost/
.
The problem is when you don’t have the trailing slash in new.artis.dev/ghost
. The rewrite loses the entire ghost
part and the rest of the requests get messed up like in the screenshot.
I have tried countless combinations in the _reddirects file of /ghost /ghost/
before and after and variations of these I could think of but I only ever get an infinite redirect loop or this error with the missing segment.
- Netlify URL:
new-artis-dev.netlify.app
- Custom domain URL:
new.artis.dev
- Contents of _redirects file:
/ghost/* https://artis-dev-2-cms.herokuapp.com/ghost/:splat 200!