如果我在浏览器https://beeidea.com.br/中告知,它将毫无问题地重定向到https://beeidea.com.br/home 。 但是,如果我在地址栏中键入https://beeidea.com.br/home ,它将显示代码404
有任何想法吗?
您需要在服务器上返回index.html文件。 就像是:
this.expressApp.get("/*", function (req, res, next) {
return res.sendFile(clientFolder + '/index.html');
})