[1.5.x] Fixed #19488 -- Made i18n_patterns redirect work with non-slash-ending paths

Thanks Daniel Gerzo for the report and the initial patch.
Backport of bcdb4898c from master.