在本地主机上,chrome 正在重定向到另一个项目 base_url

问题描述 投票:0回答:1

在我的另一个 Next.js 项目中,我必须将用户从

/
重定向到
/home/base

async redirects() {
    return [
      {
        source: "/home",
        destination: "/home/sales",
        permanent: true,
        basePath: false,
      },
      {
        source: "/",
        destination: "/home/sales",
        permanent: true,
        basePath: false,
      },
    ];
  },

在我当前的项目中,尽管我已经清除了开发者工具应用程序上的缓存、会话、本地存储,但它还是在做同样的事情。

我该如何解决这个问题?

I actually do not want to clear browsing data for all sites because I do not want to get signed out of some other websites.

google-chrome browser next.js localhost
1个回答
0
投票

假设您在端口 3000 进行开发,导航到 localhost:3000?something_whatever 这就像缓存清除,这将是 chrome 的新站点,它不会重定向。现在您可以清除网站缓存和数据等等,之后您可以直接访问 localhost:3000

© www.soinside.com 2019 - 2024. All rights reserved.