【问题标题】:a 500 Internal Server Error error was encountered遇到 500 Internal Server Error 错误
【发布时间】:2015-08-16 11:12:06
【问题描述】:

我刚刚将我的本地项目(覆盖现有的正常工作的项目)上传到远程服务器。
我的 .htaccess 看起来像:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]  

<Files "index.php">
AcceptPathInfo On
</Files>

RewriteRule    ^username    http://www.google.com
#^([a-zA-Z0-9_-]+)$ user/profile/USERNAME=$1

日志错误:

Application.cpp:256 中的 SoftException:文件 "/home/fewextra/public_html/index.php" 可以按组写

浏览器错误:

知道如何解决吗? 到目前为止,我尝试了 thisthis 但没有运气。

注意:同一个项目,当我上传到另一台服务器时,它可以工作。

【问题讨论】:

  • 删除最后一条规则中[NC,L]之后的所有内容
  • 检查 Apache error.log

标签: php .htaccess codeigniter web-hosting remote-server


【解决方案1】:

您尝试的修复与此消息无关,也不是访问问题。这是说你的权限太宽松了。尝试进行一些更改,然后查看。

public_html 的权限更改为755,将index.php 的权限更改为644

【讨论】:

  • 我的 public_html 已经拥有 755 个权限,index.php 644 也是如此
【解决方案2】:

这对我有用:

将目录的权限更改为 755 和 php 文件和其他文件 到 644

Source

【讨论】:

    猜你喜欢
    • 2017-08-27
    • 1970-01-01
    • 2020-09-11
    • 2017-05-07
    • 2023-03-30
    • 2020-06-18
    • 2011-09-22
    • 2013-03-13
    相关资源
    最近更新 更多