Skip to content

Instantly share code, notes, and snippets.

@malle-pietje
Last active December 14, 2023 06:34
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save malle-pietje/c030e9d6ccdc1c3ddfdfc4363ba79489 to your computer and use it in GitHub Desktop.
Save malle-pietje/c030e9d6ccdc1c3ddfdfc4363ba79489 to your computer and use it in GitHub Desktop.
Redirection to a custom URL from the UniFi controller JSP-based captive portal
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title><unifi txt="Redirector" /></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="refresh" content="0;url=https://<YOUR CAPTIVE PORTAL URL>/<unifi var="mac" />/<unifi var="ap_mac" />">
</head>
<body>
</body>
</html>
@malle-pietje
Copy link
Author

That does make sense, thanks for the feedback.

@Maxwellkurt0407
Copy link

image
Should the settings of the controller be like this?

@Maxwellkurt0407
Copy link

Can this code be used if the unifi controller is being hosted online, cloud?

@vettorazi
Copy link

@malle-pietje Thank you so much for your help! <3

@malle-pietje
Copy link
Author

@malle-pietje Thank you so much for your help! <3

You’re welcome 👍

@CumpsD
Copy link

CumpsD commented Dec 13, 2023

FYI legacy hotspot seems to be completely gone from Network 8.0.24, only the Angular seems to be left

@malle-pietje
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment