Skip to content

Commit

Permalink
Merge pull request #165 from datacamp/oge-1830-move-to-permanent-redi…
Browse files Browse the repository at this point in the history
…rects

[OGE-1830] move to 301s instead of 307
  • Loading branch information
Joachimzeelmaekers authored Sep 11, 2024
2 parents 68b971f + 7355a11 commit 616ba53
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module.exports = {
return [
{
destination: '/',
permanent: false,
source: '/trends',
statusCode: 301,
},
{
destination: '/',
permanent: false,
source: '/taskviews',
statusCode: 301,
},
];
},
Expand Down
2 changes: 1 addition & 1 deletion pages/campus/help/[package]/[topic].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const getServerSideProps: GetServerSideProps = async ({
return {
redirect: {
destination: `/packages/${packageName}/versions/${latestVersion}/topics/${topicName}`,
permanent: false,
statusCode: 301,
},
};
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion pages/link/[topic].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const getServerSideProps: GetServerSideProps = async ({
return {
redirect: {
destination: res.url.replace(API_URL, ''),
permanent: false,
statusCode: 301,
},
};
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion pages/packages/[package].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const getServerSideProps: GetServerSideProps = async ({
return {
redirect: {
destination: `/packages/${packageName}/versions/${latestVersion}`,
permanent: false,
statusCode: 301,
},
};
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion pages/packages/[package]/functions/[function].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const getServerSideProps: GetServerSideProps = async ({
return {
redirect: {
destination: `/packages/${packageName}/versions/${latestVersion}/topics/${functionName}`,
permanent: false,
statusCode: 301,
},
};
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion pages/packages/[package]/topics/[topic].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const getServerSideProps: GetServerSideProps = async ({
return {
redirect: {
destination: `/packages/${packageName}/versions/${latestVersion}/topics/${topicName}`,
permanent: false,
statusCode: 301,
},
};
} catch (error) {
Expand Down

0 comments on commit 616ba53

Please sign in to comment.