简体   繁体   中英

CakePHP shows 500 Internal Server Error

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, ie 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM