CakePHP显示500内部服务器错误

问题描述:

我的CakePHP安装有问题。

I'm having a problem with my CakePHP installation.

我正在子文件夹中进行开发,并且工作正常。但是,当我将其移至根文件夹时,它显示500 Internal Server Error。

I was developing it in a subfolder and it was working fine. But, when I move it into the root folder, it's showing 500 Internal Server Error.

例如,它在以下位置运行良好:mysite.com/demo/
但是,当我将其移至同一服务器根目录时,即mysite.com /显示错误。

For example, it was working fine on: mysite.com/demo/ But, when I move it into the same server root, i.e. mysite.com/ it's showing the error.

CakePHP版本:2.2

CakePHP Version: 2.2

由于在/ demo /文件夹上运行良好,我认为mod_rewrite等

As it was working fine on /demo/ folder, I think the mod_rewrite etc. are working fine, so that confused what's happening with the root folder.

任何想法?

预先感谢。

请检查.htaccess文件并如果将RewriteBase / folder / subfolder更改为RewriteBase /

Please check .htaccess file and change if RewriteBase /folder/subfolder to RewriteBase /

如下所示

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteBase /
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

以及在调试模式下(\app\Config\core.php) Configure :: write('debug',2); 暂时清除缓存,然后关闭 Configure :: write('debug',0);

and also On the debug mode (\app\Config\core.php) Configure::write('debug',2); for clearing cache for a moment and then off Configure::write('debug',0);