Host a simple website ON a wifi router?

26,810

Yes, it is possible. Your best bet is to find a router that can run OpenWRT or DD-WRT firmware. Both of these allow you to run a web server on the router itself.

OpenWRT is more of a pure open-source experience, but in my experience it's supported by fewer routers. Here's a list of supported routers, and here's instructions for setting up a web server.

For DD-WRT, here's a list of supported routers and instructions for setting up a web server.

As far as forcing the user to watch the video, you're looking for Captive Portal functionality. For example, OpenWRT has pepperspot. The router would keep a list of "approved" hosts that have suffered through your video, and any HTTP request that comes from an unapproved host would be rewritten to load the video.

To make sure that the user watches the whole thing, the Flash video itself would need to signal to the router its completion. This would be done by accessing a specific URL at the end. (Accomplish this is a Flash-specific skill.) That URL would point to some script on your web server. The script would mark the host as approved, then redirect him to some success page. (Like Google.)

Good luck!

Share:
26,810

Related videos on Youtube

xedgex
Author by

xedgex

Updated on September 18, 2022

Comments

  • xedgex
    xedgex almost 2 years

    I need to setup a wifi 'guest' access network that will automatically direct users to a website with a flash video. The website can either be hosted internally or externally. The goal would be to make sure the user can not access anything else until the video is done playing or for a certain amount of time after agreeing to the terms of wifi.

    Questions, any wifi router that can actually work as a web server, where the files can be stored and loaded from? I'm familiar with SonicWALL unit, and I've setup guest networks. This would avoid us hosting the site externally.

    If we do host the site externally, once the users join wifi, is there a way to keep them on the page until the video is done?

    • Michael Hampton
      Michael Hampton over 11 years
      This sort of setup is called a "captive portal" and there are many such systems available.
    • Tom O'Connor
      Tom O'Connor over 11 years
      Why does it have to be a Flash video? The 1990s are over. Flash video is dead.
    • tombull89
      tombull89 over 11 years
      While (I've only had expereince with DD-WRT) DD-WRT would do what the OP wants, a lot of compatible routers have a small amount of storage so you would not be able to upload a video to be stored on the router.