#Rewrite not working on deployed app

3 messages · Page 1 of 1 (latest)

cobalt python
#

I have this rewrite config:

/** @type {import('next').NextConfig} */
const nextConfig = {
  async rewrites() {
    return [
      {
        source: "/",
        destination: "https://wax-wanderer-7334.typedream.app/",
      },
      {
        source: "/:path*",
        destination: "https://wax-wanderer-7334.typedream.app/:path*",
      },
    ];
  },
};

module.exports = nextConfig;

Locally everything works, app loads. I tried both pnpm build & pnpm start as well as pnpm dev. But when I deploy to Vercel, it doesn't work.

Here is original page:
https://wax-wanderer-7334.typedream.app/

Here is page with desired rewrite:
https://www.bubbleteabrno.cz/

According to DevTools other stuff returns 404, but... why if it works locally?

earnest stirrupBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

cobalt python
#

As I wasn't able to fix this I went with the iframe solution, but it would be better if this would work. Any ideas?