Skip to content

Commit

Permalink
redirect to new url
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrickaby committed May 2, 2024
1 parent f721e69 commit 6eaba7a
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
async redirects() {
return [
{
source: '/r',
destination: '/',
permanent: true
}
]
if (process.env.VERCEL_ENV === 'production') {
return [
{
source: '/',
destination: 'https://reddit-viewer.com/',
permanent: true
},
{
source: '/r',
destination: '/',
permanent: true
}
]
} else {
return [
{
source: '/r',
destination: '/',
permanent: true
}
]
}
},
logging: {
fetches: {
Expand Down

0 comments on commit 6eaba7a

Please sign in to comment.