共享托管网络上的 Laravel::ERR_ABORTED 404(未找到)

时间:2021-01-08 12:31:49

标签: laravel npm shared-hosting tailwind-css laravel-livewire

我在共享主机中成功安装了 composer、npm 和 Tailwind 后,遇到了这个问题。 页面正在显示,但没有 css 和 js 显示错误:

GET http://mydomain.preview-domain.com/css/app.css  net::ERR_ABORTED 404 (Not Found)
GET http://mydomain.preview-domain.com/js/app.js  net::ERR_ABORTED 404 (Not Found)

但在我的 app.blade.php 中我正在导入:

<head> 
        ...
        <link href="{{ asset('css/app.css') }}" rel="stylesheet"> 
        ...
</head>
<body>
        ...
        <script src="{{ asset('js/app.js') }}" defer></script>
        ...
</body>

公用文件夹的路径似乎有误。 我将不胜感激任何帮助。我知道在共享主机中使用 Laravel 不是一个好主意。

[注意]:我创建了一个从网站公共文件夹到 Laravel 的 index.php 的符号链接。这就是 index.php 的运行方式。

0 个答案:

没有答案
相关问题