-
SummaryLocally I want "http://localhost:3000/" to transparently go to "example.com" I can map subpaths successfully with the same rewrite feature, for example "http://localhost:3000/us" -> "example.com/us" ... etc, but for root it not clear what would the config be. I am following this ("next": "14.1.0") I need solution for v14.1.0 and v12.1.0 Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, I tried with: /** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
return {
beforeFiles: [{ source: "/", destination: "https://example.com" }],
};
},
};
export default nextConfig; And it works, the |
Beta Was this translation helpful? Give feedback.
Hi,
I tried with:
And it works, the
/
goes to example, and other routes take me to the Next.js page.