Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By BruceFerjulian
#48334 Did some searching and could not find an answer to this question.

Q: Can you conditionally serve different HTML based on whether the caller arrives from the AP address or STATION address?

I am trying to get my head around a configuration interface and it would be nice if the AP interface served up the configuration page and the STATION side served up HTML which display's some sensor's data.
User avatar
By BruceFerjulian
#48355 As a starting point, this worked for me.

Code: Select all  IPAddress IpAP(10, 0, 100, 1);
  if (client.localIP() == IpAP) {
    Serial.println();
    Serial.println("CONFIGURED: You are connected through the ACCESS_POINT mode.");
  } else {
    Serial.println();
    Serial.println("CONFIGURED: You are connected through the STATION mode.");
  }