Removing trailing slash and redirect to non-slash

Either you want to rewrite it (so that the browser/client uses the same URL), but only the servers sees it without the trailing slash, OR you would like to emit a redirect without the trailing URL.

You cannot do both. So which is it?