I followed the ESP32/ESP8266 Insert Data into MySQL Database using PHP and Arduino IDE course and all worked fine
when after a few months i restarted but i goT the HTTP response code 301 instead of 200.
What is changed? because i think it has to do with a redirection of the website.
How can i solve this?
filip
I can change the graph when changing values in the post.php file
serialprint : in arduinoide esp32:
18:45:03.001 -> Received packet 'LoRaData= &value1=0&value2=8&value3=0.106' with RSSI -48
18:45:03.001 -> + Sending packet
18:45:03.001 -> httpRequestData: api_key=tPmAT5Ab3j7F9&value1=0&value2=8&value3=0.106
18:45:03.600 -> HTTP Response code: 301
but noting is received in the graph
Hello Flip, Can you send me the domain name and web page for your domain?
Does your domain have https enabled? It might be causing a redirect from http to https
https://kippentrailer.com/
indeed https
when i change it in the arduino ide from
const char* serverName = “http://kippentrailer.com/post-esp-data.php”;
to:
const char* serverName = “https://kippentrailer.com/post-esp-data.php”;
i get responsecode 400!
Can you try to open a ticket on Bluehost support? Then, ask them to disable HTTPS on that specific URL
It looks like they’ve activated some code in your server to enable https on all pages.
Let me know if they got back to you and what they told you to change. Thanks!