Skip to content

Commit 7355a11

Browse files
author
joachimzeelmaekers
committed
feat: move to statusCode 301 instead of permanent: true to change the statuscode for redirects from 308 to 301
1 parent fb2215a commit 7355a11

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

next.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ module.exports = {
33
return [
44
{
55
destination: '/',
6-
permanent: false,
76
source: '/trends',
7+
statusCode: 301,
88
},
99
{
1010
destination: '/',
11-
permanent: false,
1211
source: '/taskviews',
12+
statusCode: 301,
1313
},
1414
];
1515
},

pages/campus/help/[package]/[topic].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const getServerSideProps: GetServerSideProps = async ({
2323
return {
2424
redirect: {
2525
destination: `/packages/${packageName}/versions/${latestVersion}/topics/${topicName}`,
26-
permanent: true,
26+
statusCode: 301,
2727
},
2828
};
2929
} catch (error) {

pages/link/[topic].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const getServerSideProps: GetServerSideProps = async ({
2929
return {
3030
redirect: {
3131
destination: res.url.replace(API_URL, ''),
32-
permanent: true,
32+
statusCode: 301,
3333
},
3434
};
3535
} catch (error) {

pages/packages/[package].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const getServerSideProps: GetServerSideProps = async ({
2323
return {
2424
redirect: {
2525
destination: `/packages/${packageName}/versions/${latestVersion}`,
26-
permanent: true,
26+
statusCode: 301,
2727
},
2828
};
2929
} catch (error) {

pages/packages/[package]/functions/[function].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const getServerSideProps: GetServerSideProps = async ({
2222
return {
2323
redirect: {
2424
destination: `/packages/${packageName}/versions/${latestVersion}/topics/${functionName}`,
25-
permanent: true,
25+
statusCode: 301,
2626
},
2727
};
2828
} catch (error) {

pages/packages/[package]/topics/[topic].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const getServerSideProps: GetServerSideProps = async ({
2222
return {
2323
redirect: {
2424
destination: `/packages/${packageName}/versions/${latestVersion}/topics/${topicName}`,
25-
permanent: true,
25+
statusCode: 301,
2626
},
2727
};
2828
} catch (error) {

0 commit comments

Comments
 (0)