Did you enable the .htaccess redirect in settings/ssl? That should force all requests to https.
I have updated the GitHub code with a function that will force SSL on the wp rest api.
I welcome any feedback on this update! Please let me know if that would resolve it for you.
https://github.com/rlankhorst/really-simple-ssl
Thread Starter
n8bar
(@n8bar)
Nope. ReST API still available on unencrypted http:// mywordpress.example.com/wp-json enabling the 301 .htaccess setting does fix it though. Thanks again. 🙂
-
This reply was modified 6 years, 10 months ago by n8bar.
-
This reply was modified 6 years, 10 months ago by n8bar.
Great the .htaccess has fixed the issue for you.
But it’s strange the php method doesn’t work for you. Just checking: did you use the github version? Because I have tested this same URL, and with version 2.5.14 it redirects to https on my test environment, while it didn’t do this with .htaccess disabled on version 2.5.13.
Thread Starter
n8bar
(@n8bar)
Yes I re-downloaded from your github link and even deactivated and uninstalled the old before using the new one. I have no idea what makes my site different from your test, but I have about 30 or so plugins -none of which are supposed to mess with ssl but who knows? I might have a rogue plugin I don’t really want to deactivate or reactivate one by one ya know. “If it ain’t fixed don’t break it” er something like that.
Ok, thanks for testing and confirming!