diff --git a/next.config.js b/next.config.js index 8809504..24ccdf0 100644 --- a/next.config.js +++ b/next.config.js @@ -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; - \ No newline at end of file + module.exports = nextConfig \ No newline at end of file