在Netlify.toml文件中设置多个重定向

问题描述

我是Netlify config的新手,所以可以提供任何帮助。我正在通过Netlify建立一个香草的html,css和javascript网站,因此如果要链接https://example.com/about,则可以在about.html页面上访问它们。我可以在我的netlify.toml文件中做类似的事情吗? 如果我不包括from = "/*",那么我将无法访问该站点,但是我想从/reset-password转到页面reset-password.html,再次感谢您的帮助!>

    from = "/*"
    to = "/index.html"
    status = 200
    from = "/reset-password"
    to = "/reset-password.html"
    status = 200

解决方法

当我研究一天的其余时间时,发现所有.html文件都将作为路由存在,因此不需要重定向。如果您想链接到example.com/about,只需创建一个about.html页面,它将自动在该端点上提供。