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

    Captive Portal url:http://x.x.x.x:8002/index.php?zone to http://wireless.hotspot

    Captive Portal
    3
    6
    3.4k
    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.
    • T
      technobiz
      last edited by

      Hi guys, can you help me on this, I really could not make it happen. I want to change the default captive portal url to a domain name.

      Captive Portal url:http://x.x.x.x:8002/index.php?zone change to http://wireless.hotspot when clients want to login. What do I need to do.

      Pfsense 2.3

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

        Like https://doc.pfsense.org/index.php/Captive_Portal_Pre-authentication_Redirect ?

        Still don't get why'd you change it? They'll get redirected to the login page whether they type http://www.google.com or http://wireless.hotspot as long as it resolves in DNS.

        1 Reply Last reply Reply Quote 0
        • T
          technobiz
          last edited by

          Hey sir doktornotor, here it goes, when I connected to the hotspot and open any url, it doens't redirect to the login page instead it sends 404 error page.

          1 Reply Last reply Reply Quote 0
          • T
            technobiz
            last edited by

            where do you look for this code you are referring?

            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]

            1 Reply Last reply Reply Quote 0
            • T
              technobiz
              last edited by

              I did a fresh install of pfsense and capgive portal but still redirection to login page does not work.

              1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan
                last edited by

                This :
                @technobiz:

                …. still redirection to login page does not work.

                as a description of your problem will not help us to find out what you forget to mention (and we should know so we can tell you what is wrong).

                Tell us more if not everything about your interfaces.
                How you set up DNS.
                How you set up the portal (configure page).

                Start using the default built in login page - and make the portal should work.

                You should read : https://en.wikipedia.org/wiki/HTTP_404

                Btw : you can not change  http://x.x.x.x:8002/index.php?zone to http://wireless.hotspot
                This : http://x.x.x.x:8002/index.php?zone is already incorrect. The "zone" parameter should contains value so pfSense knows WHAT captive zone it's handling (more then one can exist)
                This : "8002" is hard coded , and the first web server instance that is running to handle your first instance.
                When you use something like "http://wireless.hotspot" it implies "http://wireless.hotspot:80" so you will get redirected …. see instruction here https://doc.pfsense.org/index.php/Captive_Portal_Troubleshooting to see what's really going on.

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.