Mikrotik Hotspot – How to redirect page after login

How redirect page after successful login
If you are using default login page on Mikrotik and you want to redirect the page after successful login follow this step.

Using Winbox download alogin.html , open using text editor, here the default code

HTML:
<!DOCTYPE html>
<head>
<title>mikrotik hotspot > redirect</title>
<meta http-equiv=”refresh” content=”2; url=$(link-redirect)”>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<meta http-equiv=”pragma” content=”no-cache”>
<meta http-equiv=”expires” content=”-1″>
<style type=”text/css”>
<!–
textarea,input,select {
background-color: #FDFBFB;
border: 1px #BBBBBB solid;
padding: 2px;
margin: 1px;
font-size: 14px;
color: #808080;
}

body{ color: #737373; font-size: 12px; font-family: verdana; }

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

–>
</style>
<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 = ‘$(link-redirect)’;
}
//–>
</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=”$(link-redirect)”>here</a></td>
</tr>
</table>
</body>
</html>
edit this part

If nothing happens, click <a href=“$(link-redirect)”>here</a></td>
Replace with your desire page to display and restore to your Mikrotik

If nothing happens, click <a href=“https://www.youtube.com/”>here</a></td>
That procedure will require the user to click the ” here” before redirection work



If you want automatic redirection , copy this code (dont forget to replace to your desire website)

add this code on your alogin.html

HTML:
<!DOCTYPE html>
<html>
<head>
<title>HTML Meta Tag</title>
<meta http-equiv = “refresh” content = “1; url =https://www.youtube.com/>
</head>
<body>
<p>Redirecting to another URL</p>
</body>
</html>
[/QUOTE]
Your alogin.html will looks like this

HTML:
<html>
<head>
<title>mikrotik hotspot> redirect</title>
<meta http-equiv=”refresh” content=”1; url=https://youtu.be/o580kZvXU3w”>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<meta http-equiv=”pragma” content=”no-cache”>
<meta http-equiv=”expires” content=”-1″>
<style type=”text/css”>

<!DOCTYPE html>
<html>
<head>
<title>HTML Meta Tag</title>
<meta http-equiv = “refresh” content = “1; url = https://youtu.be/o580kZvXU3w />
</head>
<body>
<p>Redirecting to another URL</p>
</body>
</html>

Don’t forget to give me a feedback if this procedure work on you.
 
Thread starter Similar threads Forum Replies Date
D Computers and Laptop 0
syndicate Routers 0
titorick Computers and Laptop 0

Similar threads


Top Bottom