webmoon
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 Error with SSL or wp-api or both.Hey Guys!
I think I have found the cause of the problem and therefore the solution. Thanks to this thread.My .htaccess has a rule to force a trailing slash after all URLs. The rule is:
# Force trailing slash RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ https://mysite.com.br/$1/ [L,R=301]So, as @mikele3 explained in the thread linked above, this redirection was forcing all URLs to have a “/” in the end, including the wp-json path, which is used by Contact Form 7 after the 4.8 upgrade.
I just have to add an exception in .htaccess to not redirect the /wp-json path. The final snippet is:
# Force trailing slash RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteCond %{REQUEST_URI} !^/wp-json RewriteRule ^(.*)$ https://mysite.com.br/$1/ [L,R=301]Now I have the version 4.9.1 and all the forms are sending through ajax without any issue.
I hope this could help others with the same problem.
- This reply was modified 8 years, 1 month ago by webmoon.
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 Error with SSL or wp-api or both.I’m having the same issue. Is the only solution to change those files in htaccess?
Viewing 2 replies - 1 through 2 (of 2 total)