500 internal server error occured in CakePHP 3?

2019-09-06 09:13发布

My first .htaccess file in root folder:

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

My second .htaccess file in webroot folder:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

My third .htaccess file in src folder:

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

After doing this it results in a 500 internal server error in CakePHP 3.

2条回答
看我几分像从前
2楼-- · 2019-09-06 09:54

I would first try double checking your init process verse the cakePHP3 docs http://book.cakephp.org/3.0/en/installation.html -- not knowing more of your local setup, this is where I would start

查看更多
\"骚年 ilove
3楼-- · 2019-09-06 09:56

Change every

RewriteEngine on

By this

RewriteEngine on
RewriteBase /
查看更多
登录 后发表回答