Home / Function/ nextConfig.redirects() — ui Function Reference

nextConfig.redirects() — ui Function Reference

Architecture documentation for the nextConfig.redirects() function in next.config.mjs from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  945abc03_ff6d_2cdf_1e47_c578255b0e84["nextConfig.redirects()"]
  bfca19e3_c894_11ea_8857_c9f798f55726["next.config.mjs"]
  945abc03_ff6d_2cdf_1e47_c578255b0e84 -->|defined in| bfca19e3_c894_11ea_8857_c9f798f55726
  style 945abc03_ff6d_2cdf_1e47_c578255b0e84 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/next.config.mjs lines 31–112

  redirects() {
    return [
      // Form redirects to /docs/forms.
      {
        source: "/docs/components/form",
        destination: "/docs/forms",
        permanent: true,
      },
      {
        source: "/docs/components/radix/form",
        destination: "/docs/forms",
        permanent: true,
      },
      {
        source: "/docs/components/base/form",
        destination: "/docs/forms",
        permanent: true,
      },
      // Component redirects (default to radix).
      {
        source: "/docs/components/:name((?!radix|base|form)[^/]+)",
        destination: "/docs/components/radix/:name",
        permanent: false,
      },
      {
        source: "/docs/components/:name((?!radix|base|form)[^/]+).md",
        destination: "/docs/components/radix/:name.md",
        permanent: false,
      },
      // Other redirects.
      {
        source: "/components",
        destination: "/docs/components",
        permanent: true,
      },
      {
        source: "/docs/primitives/:path*",
        destination: "/docs/components/:path*",
        permanent: true,
      },
      {
        source: "/figma",
        destination: "/docs/figma",
        permanent: true,
      },
      {
        source: "/sidebar",
        destination: "/docs/components/sidebar",
        permanent: true,
      },
      {
        source: "/react-19",
        destination: "/docs/react-19",
        permanent: true,
      },
      {
        source: "/charts",
        destination: "/charts/area",
        permanent: true,
      },
      {
        source: "/view/styles/:style/:name",
        destination: "/view/:name",
        permanent: true,
      },
      {
        source: "/docs/:path*.mdx",
        destination: "/docs/:path*.md",
        permanent: true,
      },
      {
        source: "/mcp",
        destination: "/docs/mcp",
        permanent: false,
      },
      {
        source: "/directory",
        destination: "/docs/directory",
        permanent: false,
      },
    ]

Subdomains

Frequently Asked Questions

What does nextConfig.redirects() do?
nextConfig.redirects() is a function in the ui codebase, defined in apps/v4/next.config.mjs.
Where is nextConfig.redirects() defined?
nextConfig.redirects() is defined in apps/v4/next.config.mjs at line 31.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free