简体   繁体   English

我如何解决无法加载资源状态 404 github 页面的问题

[英]how can i fix failing to load resource status 404 github pages

I have deployed my project on Github and it gives this 👇我已经在 Github 上部署了我的项目,它给出了这个👇

img_error

errors on the console and how may i fix it?控制台上的错误,我该如何解决?

and link to the git is: https://blessja.github.io/Bottelary/和 git 的链接是: https : //blessja.github.io/Bottelary/

github repo: https://github.com/blessja/Bottelary github 仓库: https : //github.com/blessja/Bottelary

Change the incorrect file URLs in the index.html .更改index.html不正确的文件 URL。

For example , you have written <link rel="stylesheet" href="/css/main.css"> which targets to https://blessja.github.io/css/main.css , which gives a error 404.例如,你编写了<link rel="stylesheet" href="/css/main.css"> ,它的目标是https://blessja.github.io/css/main.css ,它给出了一个错误 404。
Instead type <link rel="stylesheet" href="./css/main.css"> or <link rel="stylesheet" href="css/main.css"> which will get you to the right file, ie https://blessja.github.io/Bottelary/css/main.css而是键入<link rel="stylesheet" href="./css/main.css"><link rel="stylesheet" href="css/main.css">这将让您找到正确的文件,即https://blessja.github.io/Bottelary/css/main.css

And try changing all the incorrect file paths mentioned in the index.html file.并尝试更改index.html文件中提到的所有不正确的文件路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何修复在 GitHub 页面上导入 css 的 404 错误? - How can I fix 404 error importing css on GitHub Pages? GitHub 页面无法加载资源并出现 404 错误,但在本地运行时加载正常 - GitHub pages failing to load resource and giving 404 error, but it loads fine when running locally 如何在我的 GitHub 页面站点上修复 Sass? - How can I fix the Sass on my GitHub Pages site? 当我部署 - 加载资源失败:服务器响应状态为 404 () - When I deploy - Failed to load resource: the server responded with a status of 404 () 加载资源失败:服务器响应状态为404() - Failed to load resource: the server responded with a status of 404 () 加载资源失败:服务器响应状态为404 - Failed to load resource: the server responded with a status of 404 Wordpress 无法加载样式:加载资源失败:服务器响应状态为 404(未找到) - Wordpress can't load styles: Failed to load resource: the server responded with a status of 404 (Not Found) 无法加载资源:服务器响应状态为404? 资源问题 - Failed to load resource: the server responded with a status of 404 ? Resource issue 如何修复 github 页面中未显示的图像? - How do i fix image not displaying in github pages? 加载资源失败:服务器响应状态为404(未找到),我写目录错误吗? - Failed to load resource: the server responded with a status of 404 (Not Found) Am I wrong to write directory?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM