Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/243.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 所有Post请求都在Wordpress中发现302错误_Php_Wordpress_.htaccess - Fatal编程技术网

Php 所有Post请求都在Wordpress中发现302错误

Php 所有Post请求都在Wordpress中发现302错误,php,wordpress,.htaccess,Php,Wordpress,.htaccess,我有一个Wordpress网站要维护。我使用Apache作为服务器。我不知道为什么所有post请求都有302 find响应,这导致url重定向。这使我的网站无法发布任何内容,进行任何更新 例如: 我访问login.php 发布用户名和密码 我收到302发现错误,位置为:index.php 然后我的浏览器获取index.php 你能告诉我应该看什么吗?我试过: .发动机关闭 但问题仍然存在。所有GET请求都没有问题。但只有POST请求有问题 我的访问权限: Options +FollowSymLi

我有一个Wordpress网站要维护。我使用Apache作为服务器。我不知道为什么所有post请求都有302 find响应,这导致url重定向。这使我的网站无法发布任何内容,进行任何更新

例如:

  • 我访问login.php
  • 发布用户名和密码
  • 我收到302发现错误,位置为:index.php
  • 然后我的浏览器获取index.php
  • 你能告诉我应该看什么吗?我试过:

  • .发动机关闭
  • 但问题仍然存在。所有GET请求都没有问题。但只有POST请求有问题

    我的访问权限:

    Options +FollowSymLinks
    RewriteEngine On
    <IfModule mod_speling.c>
    CheckSpelling on
    </IfModule>
    RewriteRule ^search/?$  search.php [NC,L]
    RewriteRule ^about-us/?$  about-us.php [NC,L]
    RewriteRule ^country/?$  country.php [NC,L]
    RewriteRule ^city/?$  city.php [NC,L]
    RewriteRule ^city/letter/(.*)/$  city.php?city=$1 [NC,L]
    
    Options+FollowSymLinks
    重新启动发动机
    拼写检查
    重写规则^search/?$search.php[NC,L]
    重写规则^about-us/?$about-us.php[NC,L]
    重写规则^country/?$country.php[NC,L]
    重写规则^city/?$city.php[NC,L]
    重写规则^city/letter/(.*)/$city.php?city=$1[NC,L]
    
    Wordpress似乎容易出现这些302重定向问题

    更多信息: 大多数处理POST的php文件也处理GET。例如,login.php本身就是一个登录表单,并且还编写了处理登录处理的代码


    非常感谢您的回复。

    您使用的是Apache还是NGINX?如果是Apache,请发布htaccess的内容。您是否已检查虚拟主机中是否有任何重写?(我猜重定向依赖于尾部斜杠)。@MagnusEriksson感谢您的回复。是阿帕奇。但我已经试过了。但是问题仍然存在。你所说的“重定向关闭”是什么意思?你把它放哪儿了?这真的是完整的htaccess吗?如果是,你没有在Wordpress上使用好的URL?@MagnusEriksson抱歉。应该关掉引擎。这是完全可以访问的。感谢you@MagnusEriksson那么,你认为是什么原因导致了这种奇怪的问题呢?POST有302错误但未获取?