We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 548780a + 0bfa26d commit 9c765abCopy full SHA for 9c765ab
src/redirects/lib/permalinks.ts
@@ -33,9 +33,12 @@ export default function permalinkRedirects(
33
}
34
35
// Exceptions where the `redirect_from` entries are too old
36
+ // Only replace /enterprise/ when it's at the start of the path followed by /admin/
37
+ // This handles legacy patterns like /enterprise/admin/... → /admin/...
38
+ // but preserves paths like /early-access/enterprise/... where enterprise is a directory name
39
frontmatterOldPath = frontmatterOldPath
40
.replace('/admin/guides/', '/admin/')
- .replace('/enterprise/', '/')
41
+ .replace(/^\/enterprise\/admin\//, '/admin/')
42
43
permalinks.forEach((permalink, index) => {
44
// For the first supported permalink (the order is determined by lib/all-versions),
0 commit comments