Skip to content

Commit

Permalink
Merge pull request #494 from G-Core/redirect-from-old-urls
Browse files Browse the repository at this point in the history
add-redirect
  • Loading branch information
IgorSinyak authored Oct 25, 2023
2 parents 344a204 + f1846b2 commit 63b08dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scully/plugins/redirects/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function setRedirects(routes: Array<HandledRoute>): Promise<void> {
const redirectString = redirectedRoutes
.map(
(route) =>
`location ~ ^/docs${route.data.oldUrl as string}/?$ { rewrite https://$host/docs${route.route}; }`,
`location ~ ^/docs${route.data.oldUrl as string}/?$ { return 301 https://$host/docs${route.route}; }`,
)
.join('\n ');
const config = fs.readFileSync(configPath, {
Expand Down

0 comments on commit 63b08dd

Please sign in to comment.