Click here to Skip to main content
15,887,821 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm designing an embedded web server and want the browser to come up with an initial page upon connection. We've all seen this happen at places like airports, hotels or Starbucks. How can I do the same thing?

I can trap for when a DHCP completes, but what should I do then?
Should I just send a web page with http headers? If I do that, what should the headers be? Should I insteads send some kind of message from the server to the client to prompt the client to query a url? Any insight is appreciated.
Bill

What I have tried:

I'm awaiting suggestions on how to proceed.
Posted
Comments
Nathan Minier 4-Jun-18 7:26am    
You're talking about 2 different things. Are you designing a web interface for a device or are you trying to intercept and redirect pre-existing traffic (the access point agreements that you're referencing)? Or both, such as for a network filtering appliance?
Bill Colias 4-Jun-18 21:05pm    
I think both. When the client connects the server is generates an initial page. I'm modifying the web server to send a page. The client could be a simple iPhone connecting to a server, the web server lives in my embedded environment.

When the client (iPhone) connects, it does not do an initial GET request. So how does a server send an initial page without that initial GET request?
Bill Colias 4-Jun-18 23:44pm    
I may have found the answer to my question. The term needed to know is "active portal". Now that I know this term, I can google the answers I need.
https://en.wikipedia.org/wiki/Captive_portal

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900