Page 1 of 1

Hotspot login redirect to another page

Posted: Tue May 14, 2013 12:59 pm
by Riajul74
Hello ,

I have router RB 450. from last few days when i login it redirect to another page where should it go not. please see screen shoot here.

just to inform you i have a domain on my local network . sometime i have seen when my domain server is turn off, then it goes to normal status. but if it turn on then it goes to wrong.

please somebody help me with this.

best

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 1:27 pm
by SurferTim
Did you modify the login.html file? Insure you didn't change this.
<input type="hidden" name="dst" value="$(link-orig)" />

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 1:47 pm
by Riajul74
Hello,

Thanks for your answer. please see details. It have not changed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>internet hotspot > login</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<style type="text/css">
body {color: #737373; font-size: 10px; font-family: verdana;}

textarea,input,select {
background-color: #FDFBFB;
border: 1px solid #BBBBBB;
padding: 2px;
margin: 1px;
font-size: 14px;
color: #808080;
}

a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 10px; }
a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
img {border: none;}
td { font-size: 14px; color: #7A7A7A; }
</style>

</head>

<body>
$(if chap-id)
	<form name="sendin" action="$(link-login-only)" method="post">
		<input type="hidden" name="username" />
		<input type="hidden" name="password" />
		<input type="hidden" name="dst" value="$(link-orig)" />
		<input type="hidden" name="popup" value="true" />
	</form>
	
	<script type="text/javascript" src="/md5.js"></script>
	<script type="text/javascript">
	<!--
	    function doLogin() {
		document.sendin.username.value = document.login.username.value;
		document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
		document.sendin.submit();
		return false;
	    }
	//-->
	</script>
$(endif)

<div align="center">
<a href="$(link-login-only)?target=lv&dst=$(link-orig-esc)">Latviski</a>
</div>

<table width="100%" style="margin-top: 10%;">
	<tr>
	<td align="center" valign="middle">
		<div class="notice" style="color: #c1c1c1; font-size: 9px">Please log on to use the internet hotspot service<br />$(if trial == 'yes')Free trial available, <a style="color: #FF8080"href="$(link-login-only)?dst=$(link-orig-esc)&username=T-$(mac-esc)">click here</a>.$(endif)</div><br />
		<table width="280" height="280" style="border: 1px solid #cccccc; padding: 0px;" cellpadding="0" cellspacing="0">
			<tr>
				<td align="center" valign="bottom" height="175" colspan="2">
					<form name="login" action="$(link-login-only)" method="post"
					    $(if chap-id) onSubmit="return doLogin()" $(endif)>
						<input type="hidden" name="dst" value="$(link-orig)" />
						<input type="hidden" name="popup" value="true" />
						
							<table width="100" style="background-color: #ffffff">
								<tr><td align="right">login</td>
										<td><input style="width: 80px" name="username" type="text" value="$(username)"/></td>
								</tr>
								<tr><td align="right">password</td>
										<td><input style="width: 80px" name="password" type="password"/></td>
								</tr>
								<tr><td>&nbsp;</td>
										<td><input type="submit" value="OK" /></td>
								</tr>
							</table>
					</form>
				</td>
			</tr>
			<tr><td align="center"><a href="http://www.mikrotik.com" target="_blank" style="border: none;"><img src="img/logobottom.png" alt="mikrotik" /></a></td></tr>
		</table>
	
	<br /><div style="color: #c1c1c1; font-size: 9px">Powered by MikroTik RouterOS</div>
	$(if error)<br /><div style="color: #FF8080; font-size: 9px">$(error)</div>$(endif)
	</td>
	</tr>
</table>

<script type="text/javascript">
<!--
  document.login.username.focus();
//-->
</script>
</body>
</html>

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 1:48 pm
by normis
maybe your PC has a virus, or some advertising toolbar installed in the browser, which redirects pages to some ad pages

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 1:51 pm
by Riajul74
Thanks.

but no virus. i have around 70 computer on my network. all computer showing same problem.

best

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 1:53 pm
by normis
this happens to any page they open? what is the URL of the bad page that is opened?

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 1:56 pm
by Riajul74
no, it donot happen if i open any page. it only happen when i login to hotspot.

my hotspot login details like this

login.vil.com

then i give user and password. after then it moves to the attached site where it should go to status page.

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 1:57 pm
by normis
it simply redirects you to the real "vil.com". you can't use address like this. if you are forcing all network DNS requests to the router's DNS service, you can enter "login.vil.com" to be your router's IP in "/ip dns static". then it will work.

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 2:03 pm
by Riajul74
i have tried other address also. canyou please suggest me what can i use ? then i can try again ?

best

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 2:30 pm
by Riajul74
In static DNS i Have
this

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 2:31 pm
by normis
do the users use your router's IP as their only DNS server?

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 2:48 pm
by Riajul74
No, I have 1st and 2nd one is my ISP DNS, 192.168.2.1 (Windows Local Domain) and 192.168.2.254 (Router)

Re: Hotspot login redirect to another page

Posted: Tue May 14, 2013 2:54 pm
by sergejs
1) Unset "dns-name" for /ip hotspot profile. Use blank name there.

2) Make sure to use default HotSpot login page without any customization.

Re: Hotspot login redirect to another page

Posted: Wed May 15, 2013 8:57 am
by Riajul74
1) Unset "dns-name" for /ip hotspot profile. Use blank name there.

2) Make sure to use default HotSpot login page without any customization.

thanks dear. it was really helpful. its now working good with those change.

best