diff --git a/lib/get-redirect.js b/lib/get-redirect.js index 849dbaca477d..dc87b3caee6c 100644 --- a/lib/get-redirect.js +++ b/lib/get-redirect.js @@ -184,6 +184,12 @@ export default function getRedirect(uri, context) { // finds one string replacement that yields either a page or a redirect. function tryReplacements(prefix, suffix, { pages, redirects }) { const test = (suffix) => { + // This is a generally broad search and replace and this particular + // replacement has never been present in api documentation only enterprise + // admin documentation, so we're excluding the REST api pages + if (suffix.includes('/rest')) { + return false + } const candidateAsRedirect = prefix + suffix const candidateAsURL = '/en' + candidateAsRedirect return candidateAsRedirect in redirects || candidateAsURL in pages