redirect hotspot login page

Hello
I want to change the login.html so when I open the webpage I will redirect to another page (http://www.mycompany.com/wifi)
how do I do this ?
this is what I have now an image - I want to replace the img to an address

<html><head><title>Free WIFI</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=320" /><script type="text/javascript">window.addEventListener('load', function() { setTimeout(scrollTo, 0, 0, 1); }, false);</script>
<body  leftmargin="0" topmargin="0" marginwidth="0"><center><form name="login" action="http:login" method="post"><input type="hidden" name="dst" value="http://wwwgoogle.com/" /><input type="hidden" name="popup" value="true" />
<INPUT CLASS="button" TYPE="image" src="img/top1.gif"/><center><a href="disclaimer.htm"><img src="img/but1.gif"></a></center><input type="hidden" style="width: 80px" name="username" type="text" value="ronen"/>
</table>
<br /><div style="color: #c1c1c1; font-size: 9px">Powered by David /div>
</form></tr><td align="center"><img src="img/logobottom.png" /></a></td></tr></center>

</body>
</html>

how do I do this?

Thanks ,

replace login.html with something like that

<html>
<head>
<title>Please wait</title>

<body onload='connect.submit()'>

<h2 align=center><i>Please wait</i></h2>

<form name='connect' action='http://www.your_portal.com' method='post'>
  <input type='hidden' name='sip' value='$(server-address)'>
</form>

</body></html>

If you want to login, post data to “$(server-address)/login”.
Don’t forget to add your welsite to the walled garden.

O.K
yes I can see it does something but my server doesn’t see any information about who is trying to connect
also the “Active” in the hotspot doesn’t shown anything ..

maybe there is a way to connect to the hotspot of the RB and then do redirect to my site - all this automatically?

Hi David. If you plan on logging in with a page on the remote server, then that won’t work. Here is my page in the wiki on how to do this.
http://wiki.mikrotik.com/wiki/HotSpot_external_login_page

what I want is to connect automatically to the hotspot with user\pass
so I will be able to control it
and after it to redirect to a page of my own
just to be able to see my logo before it goes to the site

for example -

<html>
<head>
<title>Welcome to David WiFi .....Please wait</title>

<body onload='connect.submit()'>

<h2 align=center><i>Please wait while redirecting to google .....</i></h2>

<form name='connect' action='http://www.google.com' method='post'>
 ------> I'm assuming this part it my mistake 
<input type="hidden" name="popup" value="true" />  
<INPUT CLASS="sumbit" </a></center><input type="hidden" style="width: 80px" name="username" type="text" value="test"/> 
--------------------- mistake 
</form>
<br /><div style="color: #c1c1c1; font-size: 9px">Powered by David</div>
</form></tr><td align="center"><img src="logo.png"></a></td></tr></center>

</body></html>

that way all the users that connected by this WiFi will called test and in the hotspot I will be able to mange them as I want

Thank ,

That won’t work either. Google doesn’t care about your username. You need to modify the login.html page and send the info to the router’s hotspot, or no login. Read this section in the manual:
http://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot#Examples

I’m trying but still no good

this is what I have done
But I don’t redirect to google - why ?
all I want is to see my logo and name - and then redirect to google (after it register in the hotspot )

<html><head><title>David WIFI</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=320" />
<script type="text/javascript">window.addEventListener('load', function() { setTimeout(scrollTo, 0, 0, 1); }, false);</script>
<body  leftmargin="0" topmargin="0" marginwidth="0">
<center>
<input type="hidden" name="username" value="test">
<input type="hidden" name="password" value="none">
<input type="hidden" name="dst" value="http://www.google.com" />
</table>
<br /><div style="color: #c1c1c1; font-size: 10px">Powered by David</div>
</form></tr><td align="center"><img src="img/logobottom.png" /></a></td></tr></center>

</body>
</html>

in the hotspot I have a user call test without password

That won’t work either. You must make those modifications to the login.html page. It must include all the form and Javascript parts from the login.html doc.

I have manage to to this

<html>
<title>Hotspot login page</title>
<body>
<form name="login" action="10.0.0.1/login" method="post">
<input type="hidden" name="username" value="david">
<input type="hidden" name="domain" value="">
<input type="hidden" name="dst" value="http://mysite">

</form>
<div style="color:#c1c1c1;font-size:9px">Powered by David</div>
<table><td align="center"><img src="logo.jpg"></td>
</body>
</html>

The code is working - if I add this line

<input type="submit" name="login" value="log in">

but I don’t want to press just to - "wait 1 sec in this page .and them automatic login , then continue to mysite

I have found this online -

<html>
<head>
<script>
<!--
function login() {
document.form1.action="https://netstats.optushome.com.au/netstats.html";
document.form1.submit();
}
//-->
</script>
</HEAD>
<BODY onLoad="login()">

<form NAME="form1" id=form1 method="POST" >

<input type=hidden name="login" value="YOUR USER NAME GOES HERE">
<input type=hidden name="passwd" value="YOUR PASSWORD GOES HERE">
</form>
</body>
</html>

but I don’t understand what I need to change \ or even if it’s can help me

someone can guide?

Thanks ,