Gatsby.js的链接重定向问题

时间:2019-10-31 13:18:34

标签: gatsby contentful

我们正在使用Contentful和gatsby.js开发一个静态页面,并且面临着重定向链接的严重问题。

例如,当我键入main.com/page-1main.com/page-2时,它将重定向到根链接,而不是重定向到每个文件。

此错误仅在登台环境中复制。当我们在本地环境中尝试时,效果很好。

我们在gatsby论坛上找到了this topic,并尝试了该解决方案,但不适用于我们的应用。

我们的基础架构是nginx / docker。当我在Netlify中尝试它时,它起作用了。是框架问题还是基础设施问题?

我们的依赖项:

"dependencies": {
    "bootstrap": "^4.3.1",
    "classnames": "^2.2.6",
    "gatsby": "^2.13.39",
    "gatsby-image": "^2.2.6",
    "gatsby-plugin-manifest": "^2.2.4",
    "gatsby-plugin-offline": "^2.2.4",
    "gatsby-plugin-react-helmet": "^3.1.2",
    "gatsby-plugin-sass": "^2.1.8",
    "gatsby-plugin-segment-js": "^3.0.1",
    "gatsby-plugin-sharp": "^2.2.9",
    "gatsby-source-contentful": "^2.1.15",
    "gatsby-source-filesystem": "^2.1.6",
    "gatsby-transformer-remark": "^2.6.10",
    "gatsby-transformer-sharp": "^2.2.4",
    "html-react-parser": "^0.9.1",
    "node-sass": "^4.12.0",
    "prop-types": "^15.7.2",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-helmet": "^5.2.1",
    "react-loadable": "^5.5.0",
    "react-markdown": "^4.2.2",
    "stylelint": "^11.1.1",
    "stylelint-config-recommended": "^3.0.0"
  }

0 个答案:

没有答案
相关问题