.htaccess文件导致“500内部服务器错误”,但没有错误日志条目

我手动设置了一个apache,并添加了这个代码的第二个Web目录:

Alias /webs c:\webs <Directory /webs> AllowOverride All </Directory> 

但是,这个网站中有一个.htaccess文件,访问网站时出现错误:“500 Internal Server Error”,但是在错误日志文件中没有写入任何内容。

但是,当我删除.htaccess文件,我没有得到这个错误。

我添加了“AllowOverride All”行并重新启动服务器,但是这不能纠正错误。

我的.htaccess是这样的:

 RewriteEngine On RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?params=$1 [L,QSA] <Files "test"> Order Allow,Deny Allow from all </Files> 

我有什么要做的,我可以在这个目录中使用.htaccess文件?

在Apache Web服务器中启用mod_rewrite。 也试试这个:

 <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?params=$1 [L,QSA] <Files "test"> Order Allow,Deny Allow from all </Files> </IfModule> 

如果启用mod_rewrite,则启动重写引擎; 否则它什么都不做。

好的,我解决了这个问题,结果是另外两个问题,我会在这里logging下来,以防万一,

在我的php.ini文件中,我必须设置:

 display_errors = On 

所以它会显示错误(即使我有“error_reporting = E_ALL&〜E_STRICT”)。

然后,错误是我正在尝试与SQLite使用RedBean,并需要在我的php.ini文件中取消注释:

 extension=php_pdo_sqlite.dll extension=php_sqlite3.dll