Community discussions

MikroTik App
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Hotspot login redirect to another page

Tue May 14, 2013 12:59 pm

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
You do not have the required permissions to view the files attached to this post.
Last edited by Riajul74 on Tue May 14, 2013 1:46 pm, edited 1 time in total.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot login redirect to another page

Tue May 14, 2013 1:27 pm

Did you modify the login.html file? Insure you didn't change this.
<input type="hidden" name="dst" value="$(link-orig)" />
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Re: Hotspot login redirect to another page

Tue May 14, 2013 1:47 pm

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>
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Hotspot login redirect to another page

Tue May 14, 2013 1:48 pm

maybe your PC has a virus, or some advertising toolbar installed in the browser, which redirects pages to some ad pages
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Re: Hotspot login redirect to another page

Tue May 14, 2013 1:51 pm

Thanks.

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

best
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Hotspot login redirect to another page

Tue May 14, 2013 1:53 pm

this happens to any page they open? what is the URL of the bad page that is opened?
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Re: Hotspot login redirect to another page

Tue May 14, 2013 1:56 pm

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.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Hotspot login redirect to another page

Tue May 14, 2013 1:57 pm

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.
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Re: Hotspot login redirect to another page

Tue May 14, 2013 2:03 pm

i have tried other address also. canyou please suggest me what can i use ? then i can try again ?

best
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Re: Hotspot login redirect to another page

Tue May 14, 2013 2:30 pm

In static DNS i Have
this
You do not have the required permissions to view the files attached to this post.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Hotspot login redirect to another page

Tue May 14, 2013 2:31 pm

do the users use your router's IP as their only DNS server?
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Re: Hotspot login redirect to another page

Tue May 14, 2013 2:48 pm

No, I have 1st and 2nd one is my ISP DNS, 192.168.2.1 (Windows Local Domain) and 192.168.2.254 (Router)
You do not have the required permissions to view the files attached to this post.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Hotspot login redirect to another page

Tue May 14, 2013 2:54 pm

1) Unset "dns-name" for /ip hotspot profile. Use blank name there.

2) Make sure to use default HotSpot login page without any customization.
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Re: Hotspot login redirect to another page

Wed May 15, 2013 8:57 am

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

Who is online

Users browsing this forum: anav, Bing [Bot], CHUPAPEE, jaclaz and 196 guests