tri*_*ent 10 redirect reactjs next.js
我有一个 next.config.js ,如下所示:
module.exports = (phase, { defaultConfig }) => {
const config = withFonts(
withImages(
withSass({
publicRuntimeConfig: {
CMS_HOST: process.env.CMS_HOST,
},
// trailingSlash: true,
exportPathMap: function() {
return {
"/": { page: "/" }
};
},
redirects: async function() {
return [{
source: '/team/:slug*',
destination: '/about-us/:slug*',
permanent: true,
},{
source: '/advance-rate-model',
destination: '/financing-options',
permanent: true,
},{
source: '/medical-lien-factoring',
destination: '/financing-options',
permanent: true,
}]
}
})
)
)
return config;
};
Run Code Online (Sandbox Code Playgroud)
当我在 localhost:3000 上运行时,它工作正常,但是当我部署到 stag 和生产时,它不会重定向。有人可以帮忙吗?太感谢了。
归档时间: |
|
查看次数: |
4239 次 |
最近记录: |