0

我有一个托管在 Hostgator Cloud 上的网站(如果需要,可以运行 Linux Cent OS),它使用 Codeigniter 构建。我正在使用带有Openmanager 插件的 TinyMCE 文本编辑器来上传图像。

我的安装目录结构看起来像这样 -

.
├── application
|   ├── controllers
|   ├── models
|   └── views
|       └── desktop
|           └── add_question.php
├── editor
|   └── plugins
|       └── openmanager
|           ├── editor_plugin.js
|           ├── editor_plugin_src.js
|           ├── encodeexplorer.php
|           ├── index.php
|           ├── assets
|           ├── langs
|           └── php
└── upload
    ├── index.php
    ├── equations
    |   ├── imageCapture.php
    |   └── img
    └── images
        └── thumbs

application/views/desktop/add_question.php我已经用 tinyMCE.init 初始化了我的 tinyMCE 实例并像这样配置了 openmanager -

open_manager_upload_path: '../../../upload/',

现在,当我尝试使用插件时,我会看到这个屏幕 -

在此处输入图像描述

在咨询 Hostgator 后,他们从他们这边向我展示了这个错误日志条目 -

[error] [client 64.233.173.158]
ModSecurity: Access denied with code 406 (phase 2).
Match of "rx (/products/index\\\\.php\\\\?gallery=|connector=\\\\.\\\\./\\\\.\\\\./connectors|/admin/(?:structure/views/|[a-z]+/(?:edit|add))|/phpthumb\\\\.php\\\\?((?:w|h)=[0-9]+&)?((?:w|h)=[0-9]+&)?src=\\\\.\\\\./.*(?:pics|uploads|images)|/site-(?:builder|content)/|/node/(?:[0-9]+/( ..."
against "REQUEST_URI" required.
[file "/opt/mod_security/10_asl_rules.conf"] [line "199"] [id "340007"] [rev "42"] [msg "Generic Path Recursion denied"] [data "/../"] [severity "CRITICAL"] [hostname "example.com"] [uri "/editor/plugins/openmanager/index.php"] [unique_id "WCSMh2yz9j4AAakC028AAAPw"]

我无法正确解读此错误。究竟是什么导致了这个错误?该插件和整个应用程序在我的本地主机和我拥有的另一个共享主机帐户上正常工作,但它在这个 Hostgator 上失败了!

4

1 回答 1

0

制作一个包含以下内容的“.htaccess”文件并上传。

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

或者

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

根据您的要求调整重写规则。

可能这会有所帮助。

于 2016-11-12T10:00:18.760 回答