的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内部错误。
有任何解决方案吗?
答案 0 :(得分:0)
您的htaccess文件不应命名为.htaccess.php
,而应仅.htaccess
。
然后确保每个文件都具有良好的权限(apache可以访问它)。
还要确保mod_rewrite
已启用。