[英]Lumen: just installed lumen and cannot get resources from public folder
I'm trying to start a small project with Lumen, and I have some knowledge on Laravel and Silex. 我正在尝试与Lumen一起开始一个小项目,并且我对Laravel和Silex有所了解。 I did the instalation, sent it to my server, and now I'm trying to serve a page, the HTML from the blade file is served, but the css is not.
我完成了安装,将其发送到服务器,现在我正在尝试提供页面,提供了刀片文件中的HTML,但没有提供CSS。
Code: 码:
.htaccess to redirect all to public: .htaccess将所有重定向到公共:
RewriteEngine On
# force ssl
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
# direcionar para a raiz do app
RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
start.blade.php: start.blade.php:
<html>
<head>
<title>First page!</title>
<link href="{{ asset('css/bulma.css') }}" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body>
<p class="text">Worked!</p>
</body>
</html>
I tried solutions provided here , here , this laracast posts and this gist , but the css still 404... 我尝试了这里提供的解决方案, 这里的 laracast帖子和要点 ,但CSS仍然是404 ...
您是否尝试过chmod文件夹?
cmod 777 public
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.