显示404错误文件,在GitHub中找不到,返回到我的项目时发布]]

问题描述 投票:0回答:1

当我上传到GitHub

并成功发布时,我有一个简单的静态Web应用程序,它在实时显示中显示出来,但问题是当我单击外部链接并再次返回chrome的后退箭头时,它像这并假设在我的应用程序中我提到了一个类似<a href="https://facebook.com"></a>的链接,然后返回错误,如下所示,您可以检查以下错误。
404
File not found

The site configured at this address does not contain the requested file.

If this is your site, make sure that the filename case matches the URL.
For root URLs (like http://example.com/) you must provide an index.html file.

[这是我在GitHub上的Dist文件夹,您可以看到index.html,然后它还会显示未找到错误404文件。

enter image description here

而且我更喜欢此解决方案,但对我不起作用,这是Link,我发现了很多资源,但不起作用。

当我上传到GitHub并成功发布时,我有一个简单的静态Web应用程序,它实时显示,但问题是当我单击一个外部链接并再次使用后退箭头...

github angular6 http-status-code-404 publish file-not-found
1个回答
1
投票
我从两面都尝试过,我先尝试了无法使用的GUI,然后再通过CLI进行了正常工作,第一件事是不要从用CLI发布的GUI发布,因为我们不需要手动上传dist文件,对于dist文件,我们将使用其他命令制作dist文件,并将该dist文件直接上传到GitHub。
© www.soinside.com 2019 - 2024. All rights reserved.