-1

I wanted to set up captive portal on mikrotik router,i have created a login.php page what i want is that whenever any user connects to the hotspot then they should get redirected to login.php page.

sagar
  • 43
  • 2
  • 5

1 Answers1

2

You can't use php files directly on RouterOS, as RouterOS embedded web server is very simple (no PHP interpreter). You have to

  1. install hotspot package on RouterOS
  2. configure hotspot (several detailed examples in mikrotik wiki, for example http://wiki.mikrotik.com/wiki/Hotspot_server_setup)
  3. RouterOS will create a bunch of files to handle the hotspot clients, like login.html. From this point you will have a working hotspot.
  4. If you want to handle external database, php and other fancy stuff, you will have to follow this direction: http://wiki.mikrotik.com/wiki/HotSpot_external_login_page
  • None of these links work. I am also looking for such a solution, do you have links to tutorials that work? – Wanjila Abraham Jun 20 '21 at 08:57
  • https://wiki.mikrotik.com/wiki/Manual:IP/Hotspot https://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot / is it that hard to search "hotspot" on the Mikrotik Wiki?? – Benoit PHILIPPON Jun 21 '21 at 06:51