laravel - 除了 Laravel 中的主页 url,所有链接都不起作用
问题描述
我已经在 Xampp 中成功运行了一个 Laravel 项目。但只有家庭 url 可以正常工作。但是对于所有其他链接(例如:菜单、项目详细信息等)css 和 js 不起作用。
我的主页是
和示例 css 或 js 链接是
但是对于所有其他链接,此 css 或 js 链接将自动更改,例如:
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>
找不到解决方案在哪里更改。
有人帮忙吗?提前致谢。
请告诉我是否还有其他需要
解决方案
根文件夹/公共/前端/css/style.css
这应该是 style.css 的路径,根据您的代码验证它
推荐阅读
- javascript - 在 JavaScript 中,如何检查数组是否具有重复的多个值?
- javascript - 如何为在打字稿中创建嵌套元素结构的函数创建接口?
- flutter - Flutter setstate() 不适用于 sleep()
- testing - 电子商务网站折扣的负面情况?
- swift - 快速蒸汽路线错误 - 类型没有成员“保存”
- python - 递归正则表达式模式 - 在python中
- node.js - 使用 Socket.io [Express, Socket.io, Sequelize] 发出 Sequelize 结果时出错
- python - Python将包含列表元组的字符串解包到变量
- traefik - Traefik 2 中间件正在处理 https,但不是 http 入口点
- azure - 编排客户端功能可靠吗?