I think this is simpler with a Hotspot exactly for the reasons Feklar listed as issues. It’s hard to determine what constitutes an “initial redirect”. Just redirecting doesn’t work - the vast majority of machines now do HTTP requests well before the user ever opens a browser. On boot lots of programs check for updates, the weather widgets on the desktop fetch the current temperature via HTTP from Yahoo - if you just redirect the first tcp/80 request from a machine there’s a low chance anyone will ever see the redirect.
You can implement hotspots with “auto logins”, where the login page submits itself and the user is then shown a redirect. Since that includes an initial redirect to the Hotspot servlet, which then servers a 302 to the login.html, which then in turn users JavaScript or meta refreshes, few simple HTTP apps such as weather widgets or auto updaters follow that entire chain. If they don’t get an immediate 200 OK, they give up.
Here’s the basic code on how to do that. First you create a Hotspot profile and Hotspot. You need to at least change the interface the Hotspot attaches to, as well as the DNS name, and the hotspot-address to match the interface IP address.
/ip hotspot profile
add dns-name=hotspot.example.com hotspot-address=10.1.0.1 html-directory=hotspot http-proxy=0.0.0.0:0 login-by=http-pap name=hotspot rate-limit=1m/1m smtp-server=0.0.0.0
/ip hotspot
add disabled=no idle-timeout=30m interface=hotspot keepalive-timeout=5m name=hotspot profile=hotspot
Then create a username and password as well as a user profile. You at least need to adjust the per user rate limit in the user profile.
/ip hotspot user profile
add idle-timeout=none keepalive-timeout=15m name=hotspot rate-limit=1m/1m shared-users=unlimited status-autorefresh=1m transparent-proxy=no
/ip hotspot user
add disabled=no name=hotspot password=hotspot profile=hotspot
Then access the router via SFTP/FTP/whatever and delete all files in the ‘hotspot’ directory that got automatically created. Replace them with the below, replacing all references to ‘hotspot.example.com’ with the DNS name of your Hotspot. Also edit the URL in alogin.html to the URL you want to redirect people to:
redirect.html, status.html, fstatus.html, rlogin.html, and logout.html all have the same content:
<html>
<head>
<meta http-equiv="refresh" content="0; url=http://hotspot.example.com/login.html">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head>
<body>
</body>
</html>
login.html submits to the Hotspot on load and logs the user in with the local user credentials:
<html>
<head>
<meta http-equiv="refresh" content="0; url=login?username=hotspot&password=hotspot">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head>
<body>
</body>
</html>
And alogin.html redirects to your Facebook page after successful login:
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://www.facebook.com.com">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head>
<body>
</body>
</html>
And make an error.html that displays that there was a fatal error. That works as a minimum, you can also provide fstatus.html and status.html that give more information rather than just do nothing.
Other people don’t like meta refreshes, you can achieve the same thing with JavaScript and onLoad triggers. Personally I hate how dirty meta refreshes are, but in testing we found that more devices implement it correctly compared to JavaScript (particularly in combination with NoScript etc., where this auto login breaks until you permit JavaScript on the client).
Hope that helps.
http://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot is good reading for your purposes. All the above is more or less documented there, as it lists all the various variables etc. and how the Hotspot actually works.