Silex 500 错误

Silex 500 error

index.php

use Silex\Application;
require_once __DIR__ . './vendor/autoload.php';

$app = new Application();
$app->run();

htaccess

<IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]
</IfModule>

来访

127.0.0.1/index.php

我明白了

500 internal error.

有什么解决办法吗?

您的 htaccess 文件不应命名为 .htaccess.php,而应命名为 .htaccess.

然后确保每个文件都有良好的权限(apache 可以访问它)。

还要确保 mod_rewrite 已启用。