Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Apache Druid Website Redirects

From Leeroopedia


Knowledge Sources
Domains Website, Documentation, SEO
Last Updated 2026-02-10 10:00 GMT

Overview

website/redirects.js defines an array of URL redirect mappings used by the Docusaurus client-redirects plugin to maintain backward compatibility when documentation pages are moved or renamed.

Description

This JavaScript module exports a Redirects array where each element is an object with from and to properties. The from field can be a single URL string or an array of URL strings that should all redirect to the to URL. The file covers redirects for configuration pages, design pages, ingestion documentation, extension documentation, API references, tutorials, and operational guides. It is imported by docusaurus.config.js and fed to the @docusaurus/plugin-client-redirects plugin.

Usage

Update this file when moving, renaming, or restructuring documentation pages on the Druid website to prevent broken links from external sources, bookmarks, and search engine results.

Code Reference

Source Location

Signature

// Array of redirect rule objects
const Redirects = [
  {
    "from": "/docs/latest/old-path",
    "to": "/docs/latest/new-path"
  },
  {
    "from": [
      "/docs/latest/old-path-1",
      "/docs/latest/old-path-2"
    ],
    "to": "/docs/latest/new-path"
  },
  // ... ~50 redirect rules
];

module.exports.Redirects = Redirects;

Import

// Used in docusaurus.config.js:
const Redirects = require('./redirects.js').Redirects;

// Then passed to the plugin configuration:
plugins: [
  ["@docusaurus/plugin-client-redirects", {
    redirects: Redirects
  }]
]

I/O Contract

Inputs

Name Type Required Description
from string or string[] Yes One or more old URL paths that should be redirected
to string Yes The new URL path that the old paths should redirect to

Outputs

Name Type Description
Redirects Array<{from, to}> Exported array consumed by the Docusaurus client-redirects plugin to generate client-side redirect pages

Usage Examples

Adding a Simple Redirect

// Single old URL to new URL
{
  "from": "/docs/latest/old-page.html",
  "to": "/docs/latest/new-page"
}

Adding a Many-to-One Redirect

// Multiple old URLs all redirect to one new URL
{
  "from": [
    "/docs/latest/configuration/broker.html",
    "/docs/latest/configuration/historical.html",
    "/docs/latest/configuration/coordinator.html"
  ],
  "to": "/docs/latest/configuration/"
}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment