-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b224cd7
commit 912b9e5
Showing
1 changed file
with
13 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
trailingSlash: true, // Ensures that URLs have a trailing slash | ||
trailingSlash: true, | ||
async rewrites() { | ||
return [ | ||
return [ | ||
{ | ||
source: "/blog/:path*/", // Handles trailing slash versions | ||
destination: "https://gcse-doctor.ghost.io/blog/:path*/", | ||
source: "/blog/:path*/", | ||
destination: "https://articles.ghost.io/blog/:path*/", | ||
}, | ||
{ | ||
source: "/blog/:path*", // Handles non-trailing slash versions | ||
destination: "https://gcse-doctor.ghost.io/blog/:path*", | ||
}, | ||
source: "/blog/:path*", | ||
destination: "https://articles.ghost.io/blog/:path*", | ||
} | ||
]; | ||
}, | ||
async headers() { | ||
return [ | ||
{ | ||
source: "/blog/:path*", // Adds custom headers to blog requests | ||
headers: [ | ||
{ | ||
key: "x-forwarded-host", | ||
value: "articles.gcsedoctor.co.uk", // Replace with your desired subdomain | ||
}, | ||
], | ||
}, | ||
source: "/blog/:path*", | ||
headers: [{ key: "x-forwarded-host", value: "gcsedoctor.co.uk" }], | ||
} | ||
]; | ||
}, | ||
}; | ||
} | ||
} | ||
|
||
module.exports = nextConfig; | ||
|
||
module.exports = nextConfig |