所有链接均无法正常工作,在Laravel中接受主网址

问题描述 投票:0回答:1

我已经在Xampp中成功运行了Laravel项目。但是只有首页网址才能正常运行。但是对于所有其他链接(例如:菜单,项目详细信息等),css和js无法正常工作。

我的家庭网址是

http://localhost:90/office/sencare/

和示例css或js链接为

http://localhost:90/office/sencare/frontend/css/style.css

但是对于所有其他链接,此css或js链接将自动更改,例如:

http://localhost:90/frontend/css/style.css

office/sencare后缺少[localhost:90

。env文件

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:Dm34MLg8AbQk4ADyIG9cYPaIwYbQgrUgrN7Ani/x+JA=
APP_DEBUG=true
APP_URL=http://localhost:90/office/sencare/

。htaccess文件

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

sample.blade.phpenter image description here

找不到要更改的解决方案。

有人帮忙吗?预先感谢。

请告诉我是否还有其他需要

php laravel .htaccess laravel-5.8
1个回答
0
投票

rootfolder / public / frontend / css / style.css

这应该是您的代码中style.css的路径验证

© www.soinside.com 2019 - 2024. All rights reserved.