Community discussions

MikroTik App
 
willbur
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed May 09, 2012 8:58 am

IOS7 pop up checker override

Fri Mar 21, 2014 5:34 pm

Hello,

I stumbled upon this in the following wiki page http://wiki.mikrotik.com/wiki/Manual:Cu ... _variables and I was a little bit confused as to where this code would need to be placed:

iOS popup checker override
To work around iOS7 for iPhone login page detection, you can check for it's specific user agent, and return SUCCESS, so that iPhone doesn't pop up the login page. This is useful for setups where you use Cookies. Since the iPhone popup login window doesn't support Cookies, you might want to force users to open Safari for logging in. To achieve this, we will return "SUCCESS" only to the login page checker service, but show normal login for people opening Safari.

$(if user-agent == CaptiveNetworkSupport)
<HTML><HEAD><TITLE>Success</TITLE></HEAD><BODY>Success</BODY></HTML>
$(else)
---- regular content of rlogin.html page ----
$(endif)


Does the aforementioned code need to be placed into the login page of the hotspot? Currently we are utilizing the alternative with creating wall garden lists, but sometimes that doesn't work. Most Apple device users always keep up to date with the newest versions of IOS and so I thought this might be a better way to do it instead of doing all those wall garden list rules, however I do not know where this code would need to be placed.
 
User avatar
spr41178
Member Candidate
Member Candidate
Posts: 114
Joined: Tue Apr 01, 2014 11:11 pm

Re: IOS7 pop up checker override

Tue Apr 01, 2014 11:16 pm

Any sollution yet to your problem? I too have the same question as where to enter the code
Thanks in advance
 
willbur
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed May 09, 2012 8:58 am

Re: IOS7 pop up checker override

Fri May 09, 2014 8:01 pm

No solution on my end as of yet.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: IOS7 pop up checker override

Fri May 09, 2014 8:06 pm

Yes, all of those are supposed to be part of the HTML files of the hotspot. RouterOS pre-processes the recognized HTML file names ("login.html", etc.) and gives out the post-processed variant to the browser.
 
willbur
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed May 09, 2012 8:58 am

Re: IOS7 pop up checker override

Wed Jul 02, 2014 6:24 pm

Edit: So I see it goes into the rlogin.html page. Do I still need the walled garden rules or what? We are having too many people needing to get redirected through Safari for this to work and also people keep claiming that the login page prompts up after their Iphone comes back up from sleep mode....
 
kgninfos
Member
Member
Posts: 387
Joined: Thu Jun 21, 2012 7:34 pm
Location: Earth
Contact:

Re: IOS7 pop up checker override

Wed Jul 02, 2014 6:51 pm

read the manual carefully
http://wiki.mikrotik.com/wiki/Manual:Cu ... r_override
it's clearly shows to put the code in rlogin.html

also it's working for me
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: IOS7 pop up checker override

Thu Jul 03, 2014 8:32 am

Please confirm that putting this in "rlogin.html" fixes the issue. I see many people having this issue, maybe we need to emphasize this more.
 
kgninfos
Member
Member
Posts: 387
Joined: Thu Jun 21, 2012 7:34 pm
Location: Earth
Contact:

Re: IOS7 pop up checker override

Sun Jul 06, 2014 7:56 am

Please confirm that putting this in "rlogin.html" fixes the issue. I see many people having this issue, maybe we need to emphasize this more.
yes please do further investigation
this works sometimes but also gives random problems
 
User avatar
bajodel
Long time Member
Long time Member
Posts: 551
Joined: Sun Nov 24, 2013 8:30 am
Location: Italy

Re: IOS7 pop up checker override

Sun Jul 06, 2014 10:33 am

..this works sometimes but also gives random problems
I agree, I've even tried to 'tweak things'.. see below code, set some static dns, added some items in WalledG. It works better than before, but every damned IOS phone/version do what he pleases and we stay in unpredictable zone :D
$(if user-agent == CaptiveNetworkSupport)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Success</TITLE></HEAD><BODY>Success</BODY></HTML>
$(elseif user-agent == 'CaptiveNetworkSupport')
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Success</TITLE></HEAD><BODY>Success</BODY></HTML>
$(elseif user-agent == 'CaptiveNetworkSupport/1.0 wispr')
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Success</TITLE></HEAD><BODY>Success</BODY></HTML>
$(else)
$(if http-status == 302)Hotspot login required$(endif)
$(if http-header == "Location")$(link-redirect)$(endif)
..CUT..
$(endif)
 
willbur
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed May 09, 2012 8:58 am

Re: IOS7 pop up checker override

Mon Jul 14, 2014 6:57 pm

Okay I will give this a shot. But my primary question relating back to this rlogin.html code is whether or not it will automatically launch the captive portal or not? Or will the user still have to be redirected to an open http site?
 
TheDude
just joined
Posts: 1
Joined: Thu Aug 14, 2014 4:39 pm

Re: IOS7 pop up checker override

Thu Aug 14, 2014 4:50 pm

Has anyone been able to find a stable fix for this?

We have tried modifying the rlogin.html but it also only works sometimes for us.

Who is online

Users browsing this forum: MauriceW and 102 guests