【问题标题】:Laravel 4: 404 error after copying project from Ubuntu to Windows 8Laravel 4:将项目从 Ubuntu 复制到 Windows 8 后出现 404 错误
【发布时间】:2013-12-08 15:23:16
【问题描述】:

我尝试将一个正常工作的 Laravel 4 项目从 Ubuntu 复制到运行 WAMP 的 Windows(使用 this 作为指导),但我在每条路径上都收到 404 错误。

奇怪的是,它正在读取我的 /public 文件夹,因为当我转到 laravel.dev 时,它会将我重定向到 laravel.dev/home,这是它应该做的。

我已经调整了我的 database.php 文件以匹配我的 Windows 配置,并确保我的 vhost 文件具有与它们在 Ubuntu 上相同的参数。我知道我的配置是正确的,因为如果我用 composer 创建一个新项目,它会正常工作。

【问题讨论】:

    标签: php windows laravel-4 wamp


    【解决方案1】:

    我认为您需要在根目录中设置一个 .htaccess。

    试试

    RewriteEngine on
    Rewriterule ^(.*)$ /public/$1 [L]
    Options -Indexes
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-29
      • 2017-02-10
      • 1970-01-01
      • 2014-09-06
      • 1970-01-01
      相关资源
      最近更新 更多