Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
2 replies
BigLung

Weird default / route /en redirect behavior?

Can someone explain to me why navigating to localhost:3000

Is always redirecting me to

localhost:3000/en/home?

I had tried setting up a redirect in the next.config.mjs but removed it and recompiled

This is my next.config.mjs if this helps.

// @ts-check

/**
 * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
 * This is especially useful for Docker builds.
 */
!process.env.SKIP_ENV_VALIDATION && (await import("./src/env.mjs"));

/** @type {import("next").NextConfig} */
const config = {
  reactStrictMode: true,

  /**
   * If you have the "experimental: { appDir: true }" setting enabled, then you
   * must comment the below `i18n` config out.
   *
   * @see https://github.com/vercel/next.js/issues/41980
   */
  i18n: {
    locales: ["en"],
    defaultLocale: "en",
  },
};
export default config;
Was this page helpful?