Last active
January 24, 2018 05:41
-
-
Save teslamint/2f71932e1cdb38ea362f9cb68c5a12b5 to your computer and use it in GitHub Desktop.
Ubiquiti UniFi Guest Portal Redirect to External Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var site = decodeURIComponent(window.location.pathname), url = "YOUR_URL_HERE" | |
+ (window.location.search.indexOf('?') === -1 ? '?' : '') | |
+ window.location.search | |
// customize parameters with your needs | |
+ '&cip=' + window.location.hostname | |
+ '&cport=' + window.location.port | |
+ '&site=' + encodeURIComponent(site.replace('/guest/s/', '').replace('/', '')); | |
window.location.replace(url); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment