gpt4 book ai didi

php - CakePHP 2.0 上的服务器内部错误 500

转载 作者:行者123 更新时间:2023-11-29 02:31:58 26 4
gpt4 key购买 nike

我在我的网站框架中使用 CakePHP 2.0,我在服务器上找到了我的 cakephp 文件,但我遇到了一些问题,名为服务器内部错误 500,我不知道我应该做什么,其他页面运行良好, 但有些页面遇到 500 服务器内部错误,我检查了 Controller 、 View 、模型,他们说没有检测到错误,但 Firebug 说, View 丢失,这是我的 .htaccess 文件

public_html/cakephp/

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

public_html/cakephp/应用程序

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

public_html/cakephp/app/webroot

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

我已经按照步骤进行操作,将 / ex: app/webroot/添加到/app/webroot/并将 webroot/添加到/webroot/但仍然不适合我,我需要加强下一个项目,但这个问题困扰着我。

最佳答案

您正在使用 mod_userdir,当使用它时您确实需要 RewriteBase,因为 mod_rewrite 删除了 ~ 字符

RewriteBase /~magang/smkn1pst

所有 3 个 .htaccess 文件都应该有效,就像我一样

当前您的一个文件缺少此行

关于php - CakePHP 2.0 上的服务器内部错误 500,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11715527/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com