Leonardo Xavier
Leonardo Xavier

Reputation: 1

Next Rewrites does not load assets from the target site

I have a website and I need to have a route like site.com/route that needs to be redirected through rewrites to another application at another address. This other application needs to be displayed at site.com/rota for example. I did a test here, both applications are made with next, but when it is redirected from the main site to another application apparently not loaded correctly and apparently without the css.

/** @type {import('next').NextConfig} */
const nextConfig = {
  async rewrites() {
    return [
      {
        source: "/site",
        destination: "https://www.mysite.com.br",
      },
    ];
  },
};

export default nextConfig;`your text````

Upvotes: 0

Views: 58

Answers (0)

Related Questions