Javascript 使用Angular.JS和.htaccess重新加载页面时未获取JS/CSS文件链接

Javascript 使用Angular.JS和.htaccess重新加载页面时未获取JS/CSS文件链接,javascript,angularjs,.htaccess,Javascript,Angularjs,.htaccess,我在使用Angular.js和.htaccess重新加载页面时遇到一些链接失败错误。实际上,我正在尝试删除angular.js中的哈希标记。我设置.htaccess文件并设置基本href。我在下面解释我的代码 .htaccess: 当我在仪表板页面时工作正常。但是当我第一次在个人资料页面时工作正常,当我再次重新加载此页面时,我得到以下错误 failed to load resource: the server responded with a status of 404 (Not Found)

我在使用Angular.js和.htaccess重新加载页面时遇到一些链接失败错误。实际上,我正在尝试删除angular.js中的哈希标记。我设置.htaccess文件并设置基本href。我在下面解释我的代码

.htaccess:

当我在仪表板页面时工作正常。但是当我第一次在个人资料页面时工作正常,当我再次重新加载此页面时,我得到以下错误

failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/controller/profileController.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/controller/deptController.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/controller/deptheadController.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/js/newbill.js Failed to load resource: the server responded with a status of 404 (Not Found)
profile:118 Uncaught TypeError: $(...).chosen is not a function
http://localhost/Gofasto/dashboard/css/bootstrap.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/css/style22.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/css/plugins.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/css/pace.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/css/style.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/icons/font-awesome/css/font-awesome.min.css Failed to load resource: the server responded with a status of 404 (Not Found)

我所有的css和js文件夹都存在于
Gofasto
文件夹中,但它显示了第一次正确访问的错误链接。我还在索引页中设置了
。请帮助我解决此错误。

在引用资源时尝试使用绝对路径,例如:

<link rel="stylesheet" type="text/css" href="/Gofasto/css/style.css">

。。。或:

<link rel="stylesheet" type="text/css" href="/css/style.css">

。。。而不是:

<link rel="stylesheet" type="text/css" href="css/style.css">


这些文件的正确路径是什么?@Nerdwood:
http://localhost/Gofasto/css/style.css
这应该是路径。@Nerdwood:不,我按照你的要求做了,但链接从一开始就没有。你有网站的公共版本,还是只有本地主机版本?检查一下会非常有用。@Nerdwood:只有本地主机。你能展示一下你是如何包含资源(例如CSS)的吗?@Nerdwood:
这样一来,问题就来了,正如我在帖子中解释的那样。当我按照你的要求做时,它根本就没有出现。
<link rel="stylesheet" type="text/css" href="/css/style.css">
<link rel="stylesheet" type="text/css" href="css/style.css">