Rewrites for static NextJS page + localized routing + app folder


I have followed this guide for internationalization: The Ultimate Guide to internationalization (i18n) in Next.js 13 - DEV Community

I have 2 locales, “de” and “en”. They are mandatory by default as the page is static. If there is no locale in the URL, I want to display english content.

This was working on vercel / netlify & static export, and now I am trying to do the same on render.

This was my vercel.json file:

  "rewrites": [
      "source": "/api/:match*",
      "destination": "*"
      "source": "/",
      "destination": "/en"
      "source": "/:path((?!en|de/).*)",
      "destination": "/en/:path*"

I have added those rules in the render dashboard (I had to remove the “*” on “/en/:path*” as apparently this is not allowed): → works, proxies to API → works, displays german content → works, displays english content → works, displays english content → does not work, should display english content, but just displays a white page (returns a 200 without any response body). I think this should be already matched by the first rule.
same issue for, gives 200 / blank page:

Any idea what I am doing wrong?


It looks like my colleague has picked up the ticket you also raised. To avoid any confusion, let’s keep the conversation in one place (on the ticket). Then you can update this post when you reach the solution.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.