联系表格7导致HTTP 500错误 [英] Contact Form 7 cause HTTP 500 error
本文介绍了联系表格7导致HTTP 500错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
没人能够提交表格,我看了一下,发现POST 500内部服务器错误。
POST
注意:相同的代码在localhost上运行良好]
解决方案您需要在.htaccess文件和设置为 wordpress的本地设置文件夹名称中进行更改,但在实时站点,我们必须更改此名称。
之前
#开始WordPress
< IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase / agilitycards /
RewriteRule ^ index\.php $-[L]
RewriteCond%{REQUEST_FILENAME}!-f
RewriteCond%{REQUEST_FILENAME }!-d
RewriteRule。 /agilitycards/index.php [L]
< / IfModule>
#结束WordPress
您需要用.htaccess中的以下代码替换
#BEGIN WordPress
< IfModule mod_rewrite.c>。
RewriteEngine在
RewriteBase /
RewriteRule ^ index\.php $-[L]
RewriteCond%{REQUEST_FILENAME}!-f
RewriteCond%{REQUEST_FILENAME}! -d
RewriteRule。 /index.php [L]
< / IfModule>
#结束WordPress
No one is able to submit forms, I took a look at it and I’m getting a POST 500 Internal Server Error.
POST http://carlsbad4rent.com/wp-json/contact-form-7/v1/contact-forms/321/feedback 500 (Internal Server Error)
Note: The same code is working well in localhost[wamp]
解决方案You need change in .htaccess file and in local setup folder name set as "wordpress" but in live site we have to change this name.
Before
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /agilitycards/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /agilitycards/index.php [L] </IfModule> # END WordPress
You need to replace with below code in .htaccess file.
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
这篇关于联系表格7导致HTTP 500错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文