hello every body , I wish I will have solution for this problem ,
I am trying to install external captive portal with mikrotik , I upload html file to the mikrotik which will redirect users to the external page using this code
/tool fetch url=http://www.mywebserver.org/Mik/firmwar/Mikrotik/login.html dst-path=/flash/hotspot/login.html mode=https;/tool fetch url=http://www.mywebserver.org/Mik/firmwar/Mikrotik/alogin.html dst-path=/flash/hotspot/alogin.html mode=https;}
this code will retrieve login and alogin page from my webserver and put it in the directory flash /hotspot
and then I set the html directory as flash/hotspot
when user connect to the wifi mikrotik trying to redirect him to the login page in my web server but my problem is mikrotik redirect users many times and then generate very long url and then I get error 400 Bad Request
like this url
http://mywebserver.org/Mik/login_user/hotspot_login.php?res=notyet&mac=94%3AE9%3A79%3AFD%3A75%3A3D&user=&password=%24%28password%29&uamport=mikrotik&ip=10.5.31.253&userurl=http%3A%2F%2Fmywebserver.org%2FMik%2Flogin_user%2Fhotspot_login.php%3Fres%3Dnotyet%26mac%3D94%253AE9%253A79%253AFD%253A75%253A3D%26user%3D%26password%3D%2524%2528password%2529%26uamport%3Dmikrotik%26ip%3D10.5.31.253%26userurl%3Dhttp%253A%252F%252Fmywebserver.org%252FMik%252Flogin_user%252Fhotspot_login.php%253Fres%253Dnotyet%2526mac%253D94%25253AE9%25253A79%25253AFD%25253A75%25253A3D%2526user%253D%2526password%253D%252524%252528password%252529%2526uamport%253Dmikrotik%2526ip%253D10.5.31.253%2526userurl%253Dhttp%25253A%25252F%25252Fmywebserver.org%25252FMik%25252Flogin_user%25252Fhotspot_login.php%25253Fres%25253Dnotyet%252526mac%25253D94%2525253AE9%2525253A79%2525253AFD%2525253A75%2525253A3D%252526user%25253D%252526password%25253D%25252524%25252528password%25252529%252526uamport%25253Dmikrotik%252526ip%25253D10.5.31.253%252526userurl%25253Dhttp%2525253A%2525252F%2525252Fmywebserver.org%2525252FMik%2525252Flogin_user%2525252Fhotspot_login.php%2525253Fres%2525253Dnotyet%25252526mac%2525253D94%252525253AE9%252525253A79%252525253AFD%252525253A75%252525253A3D%25252526user%2525253D%25252526password%2525253D%2525252524%2525252528password%2525252529%25252526uamport%2525253Dmikrotik%25252526ip%2525253D10.5.31.253%25252526userurl%2525253Dhttp%252525253A%252525252F%252525252Fmywebserver.org%252525252FMik%252525252Flogin_user%252525252Fhotspot_login.php%252525253Fres%252525253Dnotyet%2525252526mac%252525253D94%25252525253AE9%25252525253A79%25252525253AFD%25252525253A75%25252525253A3D%2525252526user%252525253D%2525252526password%252525253D%252525252524%252525252528password%252525252529%2525252526uamport%252525253Dmikrotik%2525252526ip%252525253D10.5.31.253%2525252526userurl%252525253Dhttp%25252525253A%25252525252F%25252525252Fwww.sustainablesites.org%25252525252F%2525252526nasid%252525253D298_SwtYzDpONr%2525252526uamip%252525253D10.5.20.1%25252525253A80%2525252526error%252525253D%2525252526chap-id%252525253D%25252525255C306%2525252526link-login-only%252525253Dhttp%25252525253A%25252525252F%25252525252F10.5.20.1%25252525252Flogin%2525252526chap-challenge%252525253D%25252525255C044%25252525255C372%25252525255C103%25252525255C260%25252525255C276%25252525255C263%25252525255C246%25252525255C203%25252525255C145%25252525255C252%25252525255C133%25252525255C021%25252525255C103%25252525255C260%25252525255C162%25252525255C173%25252526nasid%2525253D298_SwtYzDpONr%25252526uamip%2525253D10.5.20.1%252525253A80%25252526error%2525253D%25252526chap-id%2525253D%252525255C306%25252526link-login-only%2525253Dhttp%252525253A%252525252F%252525252F10.5.20.1%252525252Flogin%25252526chap-challenge%2525253D%252525255C044%252525255C372%252525255C103%252525255C260%252525255C276%252525255C263%252525255C246%252525255C203%252525255C145%252525255C252%252525255C133%252525255C021%252525255C103%252525255C260%252525255C162%252525255C173%252526nasid%25253D298_SwtYzDpONr%252526uamip%25253D10.5.20.1%2525253A80%252526error%25253D%252526chap-id%25253D%2525255C306%252526link-login-only%25253Dhttp%2525253A%2525252F%2525252F10.5.20.1%2525252Flogin%252526chap-challenge%25253D%2525255C044%2525255C372%2525255C103%2525255C260%2525255C276%2525255C263%2525255C246%2525255C203%2525255C145%2525255C252%2525255C133%2525255C021%2525255C103%2525255C260%2525255C162%2525255C173%2526nasid%253D298_SwtYzDpONr%2526uamip%253D10.5.20.1%25253A80%2526error%253D%2526chap-id%253D%25255C306%2526link-login-only%253Dhttp%25253A%25252F%25252F10.5.20.1%25252Flogin%2526chap-challenge%253D%25255C044%25255C372%25255C103%25255C260%25255C276%25255C263%25255C246%25255C203%25255C145%25255C252%25255C133%25255C021%25255C103%25255C260%25255C162%25255C173%26nasid%3D298_SwtYzDpONr%26uamip%3D10.5.20.1%253A80%26error%3D%26chap-id%3D%255C306%26link-login-only%3Dhttp%253A%252F%252F10.5.20.1%252Flogin%26chap-challenge%3D%255C044%255C372%255C103%255C260%255C276%255C263%255C246%255C203%255C145%255C252%255C133%255C021%255C103%255C260%255C162%255C173&nasid=298_SwtYzDpONr&uamip=10.5.20.1%3A80&error=&chap-id=%5C306&link-login-only=http%3A%2F%2F10.5.20.1%2Flogin&chap-challenge=%5C044%5C372%5C103%5C260%5C276%5C263%5C246%5C203%5C145%5C252%5C133%5C021%5C103%5C260%5C162%5C173
so why this problem happening , please help me to solve it