Community discussions

MikroTik App
 
medube
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 86
Joined: Tue Feb 15, 2005 2:50 pm

Redirecting to URL after Hotspot login...

Tue Mar 15, 2005 2:40 am

Hi All,

Does anyone how to set config, so that once user logs in using Hotspot, he is automatically redirected to our web page and not original page requested? I have tried editing the login.html page changing the orig link to desired web page, but that hasnt helped.

Any suggestion is highly welcomed.

Thanks
Medube
 
User avatar
djape
Member
Member
Posts: 469
Joined: Sat Nov 06, 2004 7:54 pm
Location: Serbia

Tue Mar 15, 2005 3:33 am

Try using webserver on some of your pc's (example 192.168.1.100),
then in MT dst-nat use this:

add src-address=192.168.1.0/24 action=nat to-dst-address=192.168.1.100
to-dst-port=80

All users will be redirected to your page.

Cheers...
 
medube
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 86
Joined: Tue Feb 15, 2005 2:50 pm

Tue Mar 15, 2005 12:04 pm

Hi Djape,

Thanks for the info, but I dont think you understood the question well. Now under hotspot when user obtains an IP, he/she opens up IE and requests for example http://www.google.com, he/she is automatically redirected to the hotspot login page. Once he/she puts in user name and pass and logs in, he is automatically sent to http://www.google.com. Now what I want is no matter what is requested, lets say http://www.google.com again, user will automatically be redirected to our webpage as first page after login.

I hope this paints a better picture.

Medube
 
User avatar
djape
Member
Member
Posts: 469
Joined: Sat Nov 06, 2004 7:54 pm
Location: Serbia

Tue Mar 15, 2005 10:23 pm

OH, well, sorry :( to much beer I guess :D

Hm? I must check with my partner, I am sure that he made this to work.

Be back with some useful info...

Cheers...
 
medube
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 86
Joined: Tue Feb 15, 2005 2:50 pm

Tue Mar 15, 2005 10:40 pm

Thanks for the help so far djape. I hope to be hearing from you very soon 8)

medube
 
User avatar
bjohns
Member Candidate
Member Candidate
Posts: 272
Joined: Sat May 29, 2004 4:11 am
Location: Sippy Downs, Australia
Contact:

Wed Mar 16, 2005 1:30 am

http://www.mikrotik.com/docs/ros/2.8/ip/hotspot
To choose different page shown after login, in login.html change:

<input type="hidden" name="dst" value="%link-orig%">

to this line:

<input type="hidden" name="dst" value="http://your.web.server">

(you should correct the link to point to your server)
 
medube
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 86
Joined: Tue Feb 15, 2005 2:50 pm

Wed Mar 16, 2005 1:39 am

I have tried editing the login.html page changing the orig link to desired web page, but that hasnt helped.
Did you read that part of my first message?

medube
 
User avatar
bjohns
Member Candidate
Member Candidate
Posts: 272
Joined: Sat May 29, 2004 4:11 am
Location: Sippy Downs, Australia
Contact:

Wed Mar 16, 2005 2:34 am

No, but yes, it's the same problem I have run into. Try it with non-encrypted password set. I believe the hashing thingy overwrites it with the old. I've raised it with Mikrotik ages ago but haven't received a reply.
 
uldis
MikroTik Support
MikroTik Support
Posts: 3443
Joined: Mon May 31, 2004 2:55 pm

Wed Mar 16, 2005 11:48 am

We will change the documentation.
Current method when you change the login.html will work only in case of PAP authentication.

You should modify the alogin.html file and replace this line:
location.href = '%link-redirect%';
with this line:
location.href = 'http://your.web.server';
And also this line:
<td align="center" valign="bottom" height="50px">If still nothing happens, press <a href="%link-redirect%">here</a></td>
with this line:
<td align="center" valign="bottom" height="50px">If still nothing happens, press <a href="http://your.web.server">here</a></td>
 
medube
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 86
Joined: Tue Feb 15, 2005 2:50 pm

Wed Mar 16, 2005 6:19 pm

Thanx a lot Uldis, that really solved the whole problem.

Medube
 
Trisc
Member Candidate
Member Candidate
Posts: 242
Joined: Sat May 29, 2004 11:24 pm
Location: Glos, UK

Wed Mar 16, 2005 9:10 pm

Following on from this thread - is it possible to do an HTTP post of username/password from a different server direct to the hotspot's alogin.html page?

So when a customer payment has been authorised on our payment server it could populate a form on that server with username and password that posted to the hotspot's authorisation page.

What elements would be needed on the form?

Trisc

Who is online

Users browsing this forum: Bing [Bot], ramirez and 215 guests