Skip to content
Jan 17 / Greg

2nd Redirection Page Mikrotik Hotspot

I was asked recently for a hotspot config that includes a second redirect page. As in: web-page is pulled by standard hotspot page, once the user authenticates they are sent to a second page. This is a somewhat nonstandard configuration, so I figured I would include a quick how-to.

In this case, we wanted them to simply accept the AUP, then redirect them to an alternate page. I modified this default “Trial access” link.

1
href="$(link-login-only)?dst=$(link-orig-esc)&username=T-$(mac-esc)"

Note the dst=$(link-orig-esc) section. This variable is the URL you originally typed in your browser when accessing the hotspot. The router will authenticate you and then redirect you back to your original URL. What we need to do is simply change the variable to be whatever URL you ultimately want your user to go to.

If you were super cool and wanted your authenticated users to be redirected to gregsowell.com, you would modify your code like below.

1
href="$(link-login-only)?dst=http%3A%2F%2Fgregsowell.com&username=T-$(mac-esc)"

I asked Jimmy what he thought, then went to sleep. I had a lot of driving to do the next day and my wife had no escape route, so I figured it out on the way. When I got home, I noticed that Jimmy had come to the same conclusion the night before…hehehe.

Leave a Comment

 

*