访问 https://EXAMPLE.com/wp-json/contact-form-7/v1/contact-forms/5/feedback
我收到错误:
{
"code":"rest_no_route",
"message":"No route was found matching the URL and request method",
"data":{"status":404}
}
当您在网页上提交表单时,它会收到409冲突错误:
看来问题是通过删除 php 版本的 htaccess 声明来解决的,如下所示:
来自
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
到
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
现在,我们怎样才能拥有两者 PHP 声明并允许联系表单 7 使用休息路线?