Skip to content

Commit

Permalink
feat(fundamental-redirects): redirect archived media (#8785)
Browse files Browse the repository at this point in the history
* feat(fundamental-redirects): redirect archived media

* fixup! feat(fundamental-redirects): redirect archived media
  • Loading branch information
caugner authored May 9, 2023
1 parent 35c9ae9 commit 784beeb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libs/fundamental-redirects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,15 @@ const MISC_REDIRECT_PATTERNS = [
({ prefix, subPath = "" }) => `/docs/${prefix}${subPath}`,
{ permanent: true }
),
// Content archived as part of the GCP migration.
redirect(
/^(?<prefix>diagrams|presentations|samples)(?<subPath>\/.*)?$/i,
({ prefix, subPath = "" }) =>
`https://mdn.dev/archives/media/${prefix}${subPath}`,
{
permanent: false,
}
),
];

const REDIRECT_PATTERNS = [].concat(
Expand Down

0 comments on commit 784beeb

Please sign in to comment.