【发布时间】: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/…