Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Showing success page THEN redirect

    Scheduled Pinned Locked Moved Captive Portal
    6 Posts 3 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      l.capriotti
      last edited by

      Is it possible to implement something like a splash page shown after a successful auth that will automatically redirect to the redirurl?
      Basically I don't want to generate a popup but to notify the client of the successful auth before automatically redirect to the original site the client is trying to browse.
      Tks

      1 Reply Last reply Reply Quote 0
      • B
        Basi
        last edited by

        I would say. You could use javascript on the redirect url page to then redirect the user to another page.

        1 Reply Last reply Reply Quote 0
        • L
          l.capriotti
          last edited by

          tks for the feedback.

          How is the original URL the user was browsing passed to the redirURL page then?

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            Check referrer or whatever, frankly has nothing to do with pfSense.

            1 Reply Last reply Reply Quote 0
            • L
              l.capriotti
              last edited by

              IMHO it does as it all comes down to how the redirect is implemented, but tks for the hint.

              1 Reply Last reply Reply Quote 0
              • L
                l.capriotti
                last edited by

                with further tests I verified the referrer not to be the original URL, ie it seems the original PORTAL_REDIRURL is not made available using "After authentication Redirection URL".

                EDIT. Ok, my bad, the redirurl is indeed in the HTTP_REFERER.

                With some minor string parsing the redirurl can be extracted and used:

                
                $REFERER = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "";
                
                $arrUrl = parse_url($REFERER);
                parse_str($arrUrl['query'], $arrVar);
                
                $redirURL=$arrVar['redirurl']
                
                
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.