(docs): update i18n-routing.md (#33123)
(docs): update i18n-routing.md (#33123)

The recommended code for `_middleware.ts` does not work in prod, but does work locally.  You need to use `request.nextUrl.pathname` to properly redirect from what I can tell.  You also need to have a quick helper function to strip off the `/default` locale at the start of the pathname as we are providing `/en` as a fallback locale.

FWIW - I am pretty new to NextJS.  Someone with more experience should probably review this suggestion before merging it.  What I can tell you however is that the code as it is in `_middleware.ts` works locally but breaks in prod.  To test this out use the code and navigate to `https//www.mysite.com` - it will work as expected on the root url, as this matches `nextUrl.href`.  Now try navigating to `https//www.mysite.com/about` and you will be redirected to `https://www.mysite.com/en/https://www.mysite.com/about`.



## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`

Closes: https://github.com/vercel/next.js/pull/33762

Co-authored-by: JJ Kasper <fbae0e752deb2c0fed663fa6dec6c97ee2546cfe@users.noreply.github.com>
azukaru/next.js,JeromeFitz/next.js,azukaru/next.js,JeromeFitz/next.js,JeromeFitz/next.js,azukaru/next.js,azukaru/next.js,JeromeFitz/next.js