【问题标题】:404 error found using Laravel 4使用 Laravel 4 发现 404 错误
【发布时间】:2016-11-16 07:05:31
【问题描述】:

我在 Laravel 4 中创建了应用程序。它给出了 URL 问题。例如: 如果我使用http://example.com/login,它会显示 404 错误。

但如果我使用http://example.com/index.php/login,它会显示没有任何错误。

我想使用不带index.php 的URL,因为通过在URL 中添加index.php,页面中不包含CSS 和JS 文件。

【问题讨论】:

标签: php html css laravel laravel-4


【解决方案1】:

问题可能在您的服务器配置或 .htaccess 中

我刚刚遇到了同样的问题,为我启用 mod_rewrite for apache2 修复它。

您可能应该阅读:

https://laravel.com/docs/5.0/configuration#pretty-urls

Can't route properly in Laravel

Can't access URL in Laravel routes

【讨论】:

    猜你喜欢
    • 2014-12-21
    • 2013-12-08
    • 2014-04-25
    • 2021-02-15
    • 2016-05-02
    • 2018-05-27
    • 2019-03-04
    • 1970-01-01
    • 2018-06-07
    相关资源
    最近更新 更多