CakePHP shows 500 Internal Server Error

强颜欢笑 提交于 2020-01-05 17:36:09

问题


I'm having a problem with my CakePHP installation.

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.

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 Version: 2.2

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.

Any Idea?

Thanks in advance.


回答1:


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

like below

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

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);



来源:https://stackoverflow.com/questions/20092289/cakephp-shows-500-internal-server-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!