I played a little bit with " configuring-a-pre-authentication-redirect-for-captive-portal-users ".
Using Pre-authentication redirect URL and doing what is stated here still redirect the user to another web server. - not the captive portal.
This should be edited :
<?php require("globals.inc"); $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; } ?> [Rest of CP login page]The line
require("globals.inc");should be removed now, it's already included.
The line (URL) on the pre authed web server that takes the user back :
http://x.x.x.x:8000/index.phpshould at least include ?zone=your_zone like :
https://your_portal_server.your_pfsense.tld:8003/index.php?zone=your_zone&......https://your_portal_server.your_pfsense.tld:8003 for me because "8003" is the URL and port on which my https enabled portal server is listening.
?zone=your_zone because otherwise the portal web server will not know which zone the user is using.
and that where it ended for me right now.
I'm have this subject on my to-test list, but somewhat blocked by the fact that portal debugging means : I'm throwing out the user every time I try something.
I guess the original functionality of Pre-authentication redirect URL is still possible, but the doc should be updated a little bit.