【问题标题】:Joomla 403 Forbidden errorJoomla 403 禁止错误
【发布时间】:2015-12-25 16:13:14
【问题描述】:

我的一个网站使用 joomla 开发。实际上它是一个旧版本(1.5 版)。它运行成功,但现在显示 403 Forbidden 错误。

我的 htaccess 文件看起来像这样

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]


RewriteBase /



RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php [L]

【问题讨论】:

  • 如果行为发生了变化并且 htaccess 没有发生变化,那么很可能环境中的某些东西发生了变化。比如PHP版本或者apache版本有变化吗?
  • 我联系了托管团队,他们说是病毒引起的。你能告诉我如何从病毒中修复文件。
  • Joomla 文档站点提供了有关如果您被黑客入侵该怎么办的建议。 docs.joomla.org/Security_Checklist/…

标签: php .htaccess joomla


【解决方案1】:

我不知道您是否还有这个问题,但是当我遇到类似情况时,您的问题出现在我的搜索中。我的 htaccess 文件没问题,我无法追踪任何被黑的文件。拯救这一天的是谷歌搜索站点错误日志中的错误:

joomla 1.5 权限被拒绝:...public_html/.htaccess pcfg_openfile: 无法检查 htaccess 文件,请确保它是可读的

搜索结果将我带到this。按照那里的建议,我注意到该站点的 public_html 权限已从默认的 755 更改为 750。将其更改回 755 可以立即解决问题。 我仍在检查是否有任何黑客入侵的迹象,但目前,该网站已重新启动并运行,客户很高兴。 希望这对其他人有帮助...

【讨论】:

    【解决方案2】:

    如果您的 Joomla 网站上有病毒,那么您需要知道的第一件事就是找出病毒的位置。它似乎不在 .htaccess 文件中,因此您需要在其他地方查找。尝试在您的网站上运行 maldet(或让您的主机为您运行 maldet)并告诉您哪些文件被感染了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多