htaccess允许来自所有wordpress index.php

时间:2015-06-24 18:00:51

标签: wordpress .htaccess

我正在使用wordpress s2member pro,我在运行此行时遇到API问题:

$result = trim (file_get_contents ("http://example.com/?s2member_pro_remote_op=1", false, $post_data));

我收到了403 Forbidden错误。

我发现克服这一点的唯一方法是添加:

<Files "index.php">
  Options +Indexes FollowSymLinks +ExecCGI
  Order allow,deny
  Allow from all
</Files>

到wordpress主htaccess文件。

我的问题是我的修复是否存在安全风险,如果存在风险,您还会建议我如何解决此问题?

修改

整个htaccess:

<Files "index.php">
  Options +Indexes FollowSymLinks +ExecCGI
  Order allow,deny
  Allow from all
</Files>

# BEGIN s2Member GZIP exclusions
<IfModule rewrite_module>
    RewriteEngine On
    RewriteBase /team/
    RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
    RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
    RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /team/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /team/index.php [L]
</IfModule>

# END WordPress

0 个答案:

没有答案