Github Pages刷新应用程序时抛出404错误

时间:2020-07-23 10:23:07

标签: angular routes http-status-code-404 github-pages

我正在尝试在GitHub页面上托管以下内容:https://hdz.github.io/FCS-Training/

每当我单击链接都可以正常工作,但是刷新后仍然会收到404错误。

我尝试了以下解决方案:https://docs.github.com/en/github/working-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site

我尝试了通配符:{path: '**', redirectTo: '/home', pathMatch: 'full'}

我也尝试过:RouterModule.forRoot(routes, {useHash: true})

但它们都不起作用。

这是仓库:https://github.com/Hdz/FCS-Training

您能告诉我我在做什么错吗,请问如何修复404以重定向到网站主页?

0 个答案:

没有答案
相关问题