One of main purposes of a custom made Hotspot is advertising. Here are some few simple steps to redirect user to a specific URL (a.k.a. advertisment) after successful Hotspot Login.
The easiest way is to redirect user to an outside or an Internet address where we keep the mentioned advertisment or a commercial.
We need to edit the alogin.html file that can be found in the root directory of the Hotspot files on a MikroTik router.
Here is a sample code from the file where users will be redirected to www.itino.net after successful login:)
<script language=”JavaScript”>
<!–
function startClock() {
$(if popup == ‘true’)
open(‘$(link-status)’, ‘hotspot_status’, ‘toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=290,height=200’);
$(endif)
location.href = ‘http://www.itino.net’;
}
//–>
</script>
</head>
<body onLoad=”startClock()”>
<table width=”100%” height=”100%”>
<tr>
<td align=”center” valign=”middle”>
You are logged in
<br><br>
If nothing happens, click <a href=“www.itino.net”>here</a></td>
</tr>
Feel free to contact me at tino dot sokic at itino dot net for help…
redirect user to a specific URL after successful Mikrotik Hotspot Login, really helpful for me. thanks a lot for your post.
Bog Tino,
Evo prepoznao hrvata :))
Vidim da znas štošta o mikrotiku,bio bih zahvalan ako bi mi mogao pomoci.
Imam hot spot na mikrotiku u jednom hotelu i imam problem kada client pristupa login stranici sa neke https adrese,browser nece uopce da ga redirekta na login.
Citajuci forume vidim da bih trebao hotspot prebaciti na https i registrirati certifikat …
Borim se več 2 dana sa istim al nikako exportati i registrirati taj j. certifikat.
Neznam kako al ako mi ikako možeš pomoći nekim tutorijalom spasit ces me.
Hvala
Pozdrav Nikola iz Splita
Pozdrav Nikola, drago mi je da si me prepoznao:) Čujemo se preko maila za daljnje detalje!
Pozdrav Tino,
Prije svega hvala na korisnom članku, jer mi je pomogao pri radu i konfiguraciji, tragao sam u bespućima weba, i eto zakačio se na tvoj post, uradio postpuak i završio posao! Hvala ti još jednom na iskrenoj želji da podjeliš svoja zananja, danas malo tko sa ovih prostora to radi!
Srdačno, Mladen
Mladen, hvala na svim pohvalama! Srdačan pozz
dear sir,
where I have to write this code ? becuase I already have some other code and I don’t want to remove them
Imam problem kao Nikola gore u postu, pa ako mi možeš pomoći. Hvala
Do you mind if I quote a few of your posts as long as I provide
credit and sources back to your site? My website is in the very
same area of interest as yours and my users would genuinely benefit from a lot of the information you present here.
Please let me know if this ok with you. Thanks a lot!
Of course I am ok with it:) Just let me know when and where will be posted. Thanks, Tino
Ι beⅼieve this is one of the most significant informɑtion ffor me.
Annԁ i’m happy reacing your artіcle. But want to observation on few normal issues, The siite style
is ɡreat, the artiϲles is reaⅼly ցreat : D.
Good job, cheers