-->
Page 1 of 1

ESP8266WebServer Redirect

PostPosted: Wed May 25, 2016 11:41 pm
by Solexious
Hello all,

I'm looking to make it so that when someone goes to /findme my esp blinks an led and returns me to /, I've tried changing the 200 to 307 for a temporary redirect and the text to the url ( server.send(307, "text/url", "/"); ) without luck.

How should I be doing sending a redirect as a response? (without using a html page redirect)

Cheers

Sol

Re: ESP8266WebServer Redirect

PostPosted: Thu May 26, 2016 10:45 am
by Solexious
Code: Select allserver.sendHeader("Location", String("/"), true);
server.send ( 302, "text/plain", "");