简体   繁体   中英

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. 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.

Code:

.htaccess to redirect all to public:

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:

<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...

您是否尝试过chmod文件夹?

cmod 777 public

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM