没有人能够提交表单,我看了一下,发现 POST 500 内部服务器错误。
POST http://carlsbad4rent.com/wp-json/contact-form-7/v1/contact-forms/321/feedback 500 (Internal Server Error)
注意:相同的代码在 localhost[wamp] 中运行良好
最佳答案
您需要更改 .htaccess 文件并将本地安装文件夹名称设置为“wordpress”,但在实时站点中我们必须更改此名称。
之前
# 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
您需要在 .htaccess 文件中替换为以下代码。
# 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
关于php - Contact Form 7 导致 HTTP 500 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47529257/