Laravel 服务器上没有index.php,无法访问某些页面

Laravel 服务器上没有index.php,无法访问某些页面,laravel,laravel-5,Laravel,Laravel 5,我刚上传到服务器,遇到了一个问题,我只能看到我的主页,除非我在url后面添加www.site.com/index.php/index.php。这是laravel经常出现的错误吗?解决方法是什么?laravel不调用url*.php、*.html 您可以从route调用index.blade.php routes/web.php Route::get('/', function () { return view('index'); }); 意味着你还没有读过文件。如果没有index.ph

我刚上传到服务器,遇到了一个问题,我只能看到我的主页,除非我在url后面添加www.site.com/index.php/index.php。这是laravel经常出现的错误吗?解决方法是什么?

laravel不调用url*.php、*.html 您可以从route调用index.blade.php routes/web.php

Route::get('/', function () {
    return view('index');
});

意味着你还没有读过文件。如果没有index.php无法访问它,那么就没有正确的URL配置。告诉我们config.my.htaccess应该在root还是public中?它应该和index.php放在同一个文件中,通常是public,尽管有些人会移动它。