Skip to content

Instantly share code, notes, and snippets.

@jagland
Forked from cwd24/captiveportal.php
Last active September 4, 2015 15:14
Show Gist options
  • Save jagland/15d15760949773d8287d to your computer and use it in GitHub Desktop.
Save jagland/15d15760949773d8287d to your computer and use it in GitHub Desktop.
A captive portal alternative page for pfSense in order to redirect to the redirect url.
<?php
$request_uri = urldecode(str_replace("/index.php?redirurl=", "", $_SERVER["REQUEST_URI"]));
$portal_redirurl = urldecode("$PORTAL_REDIRURL$");
if(!stristr(urldecode("$PORTAL_REDIRURL$"), $request_uri)) {
Header("Location: $PORTAL_REDIRURL$");
exit;
}
?>
@jagland
Copy link
Author

jagland commented Sep 4, 2015

Update for pfsense 2.2.4

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