From 563e5e3d572b6b4dd40bc2c70ae97ce80418a87a Mon Sep 17 00:00:00 2001 From: Zach Shilton <4624598+zchsh@users.noreply.github.com> Date: Mon, 24 Oct 2022 13:16:07 -0400 Subject: [PATCH] docs: add details to redirects file (#15020) --- website/redirects.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/website/redirects.js b/website/redirects.js index bb9a2cf78..45632320f 100644 --- a/website/redirects.js +++ b/website/redirects.js @@ -1,4 +1,29 @@ +/** + * Define your custom redirects within this file. + * + * Vercel's redirect documentation: + * https://nextjs.org/docs/api-reference/next.config.js/redirects + * + * Relative paths with fragments (#) are not supported. + * For destinations with fragments, use an absolute URL. + * + * Playground for testing url pattern matching: https://npm.runkit.com/path-to-regexp + * + * Note that redirects defined in a product's redirects file are applied to + * the developer.hashicorp.com domain, which is where the documentation content + * is rendered. Redirect sources should be prefixed with the product slug + * to ensure they are scoped to the product's section. Any redirects that are + * not prefixed with a product slug will be ignored. + */ module.exports = [ + /* + Example redirect: + { + source: '/nomad/docs/internal-docs/my-page', + destination: '/nomad/docs/internals/my-page', + permanent: true, + }, + */ // Rename and re-arrange Autoscaling Internals section { source: '/nomad/tools/autoscaling/internals/:path*',