Title: Mixed content http/https failure
Last modified: February 21, 2019

---

# Mixed content http/https failure

 *  Resolved [stabilimenta](https://wordpress.org/support/users/stabilimenta/)
 * (@stabilimenta)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/)
 * I just updated Contact Form 7 to version 5.1.1 running on WordPress 5.0.3
    My
   form now fails to send messages… I just get the little Ajax loader spinner. Inspecting
   code with console (Chrome) shows this error: `Mixed Content: The page at 'https://
   folkheritage.org/contact/' was loaded over HTTPS, but requested an insecure XMLHttpRequest
   endpoint 'http://folkheritage.org/wp-json/contact-form-7/v1/contact-forms/4/refill/'.
   This request has been blocked; the content must be served over HTTPS.`
 * Any thoughts?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmixed-content-http-https-failure%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11230380)
 * Try clearing all page cache.
 *  Thread Starter [stabilimenta](https://wordpress.org/support/users/stabilimenta/)
 * (@stabilimenta)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11230819)
 * Hello,
 * I do use WP Super Cache, but clearing it didn’t fix it.
    I tried forcing https
   via the htaccess code, which fixed the mixed content load, but one issue still
   exists.
 * My WordPress install is located in a subdirectory (/wp/), but one of the CF7 
   paths is pointing to the wrong location:
 * **GET [https://folkheritage.org/wp-json/contact-form-7/v1/contact-forms/4/feedback/](https://folkheritage.org/wp-json/contact-form-7/v1/contact-forms/4/feedback/)
   404 (Not Found)**
 * Thank you!
 *  Thread Starter [stabilimenta](https://wordpress.org/support/users/stabilimenta/)
 * (@stabilimenta)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11231212)
 * Strange… the link does work when clicked directly, but is throwing a 404 from
   the page with the CF7 form.
 *  [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11231541)
 * > Strange… the link does work when clicked directly, but is throwing a 404 from
   > the page with the CF7 form.
 * The link also does not work when clicked directly, it’s still 404 response, just
   in JSON format (not HTML).
 * > My WordPress install is located in a subdirectory (/wp/), but one of the CF7
   > paths is pointing to the wrong location
 * The location is correct, `/wp-json/` is virtual path (same like `/contact/`).
   See for example: [https://folkheritage.org/wp-json/wp/v2/pages/](https://folkheritage.org/wp-json/wp/v2/pages/)
 * It seems that the problem is related to the fact that for some reason the request
   is issued as GET request instead of POST. The `/wp-json/contact-form-7/v1/contact-
   forms/4/feedback/` end-point expects POST requests only, thus 404 error is returned.
   But why this is happening I sadly have no idea…
    -  This reply was modified 7 years, 3 months ago by [Česlav Przywara](https://wordpress.org/support/users/chesio/).
 *  [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11231557)
 * Ok, it just got to me 🙂
 * > I tried forcing https via the htaccess code, which fixed the mixed content 
   > load, but one issue still exists.
 * This fixes the problem with mixed content, but the rewrite inherently changes
   request type from POST to GET. So you have to fix the mixed content problem other
   way.
 *  Thread Starter [stabilimenta](https://wordpress.org/support/users/stabilimenta/)
 * (@stabilimenta)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11233854)
 * UPDATE:
    I removed the forced redirect in the htaccess file. I tried deactivating
   all other plugins and tried the Twenty-Fifteen theme. I am still getting this
   error: [https://folkheritage.org/wp-json/contact-form-7/v1/contact-forms/4/feedback/](https://folkheritage.org/wp-json/contact-form-7/v1/contact-forms/4/feedback/)
   404 (Not Found)
 *  [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11234677)
 * Hi [@stabilimenta](https://wordpress.org/support/users/stabilimenta/),
 * do you have any redirect rule (in `.htaccess` or in code) that adds trailing 
   slashes to requests?
 * Because this works:
 *     ```
       POST https://folkheritage.org/wp-json/contact-form-7/v1/contact-forms/4/feedback/
       ```
   
 * But this (notice the missing trailing slash) does not. POST request is rewritten
   to GET and then 404 is returned:
 *     ```
       POST https://folkheritage.org/wp-json/contact-form-7/v1/contact-forms/4/feedback
       ```
   
 * Contact Form 7 does the request without trailing slash.
 *  Thread Starter [stabilimenta](https://wordpress.org/support/users/stabilimenta/)
 * (@stabilimenta)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11237992)
 * The host had a redirect on the htaccess file which was adding a trailing slash.
   Commenting that out fixed it. The contact form was working, and then it stopped.
   I’m not sure if the plugin changed or if the htaccess file was edited to start
   the issue. In any case, it’s working now. Thank you for your help [@chesio](https://wordpress.org/support/users/chesio/).
 *  [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11244375)
 * I’m glad you managed to sort it out! 🙂
 * > The host had a redirect on the htaccess file which was adding a trailing slash.
   > Commenting that out fixed it.
 * You don’t have to comment the rule out, if you want to keep it, you just need
   to restrict it to GET requests only. Add the following line before corresponding`
   RewriteRule` in `.htaccess`:
 *     ```
       RewriteCond %{REQUEST_METHOD} GET
       ```
   
 * This way POST requests (including those from Contact Form 7) won’t be affected
   by the rule.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Mixed content http/https failure’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [json](https://wordpress.org/support/topic-tag/json/)
 * [not-found](https://wordpress.org/support/topic-tag/not-found/)
 * [spinner](https://wordpress.org/support/topic-tag/spinner/)

 * 9 replies
 * 3 participants
 * Last reply from: [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/mixed-content-http-https-failure/#post-11244375)
 * Status: resolved