Missing trailing slash - redirect not working

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. It looks like Ghost no longer automatically appends the trailing slash as it is supposed to.

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.

I’ve also tried redirects.json uploaded via Ghost admin redirecting from /ghost to /ghost/ but nothing changed.

  • 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!