Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Mar 2008
    Posts
    7

    Default Cpanel custom login fail page redirect

    Hello,

    I have the followig code below that will login into the domain's webmail. The code is on a custom login page domain.com/maillogin.php. The code works fine. The only problem is if a user enters a wrong user/password, they get redirected to the default webmail login page, domain.com:2095/login/. I would like to have it go to the domain.com/maillogin.php page. I've been searching around for a solution with no luck thus far. Any help would be great.

    Lance

    <?php

    #Webmail
    $protocol = 'http';
    $port = 2095;


    <html>
    <b>cPanel Login</b><br>
    <?php
    if ($_GET['failed'] == "1") {
    echo "Your login attempt failed!";
    }
    echo "<form action=\"" . $protocol . "://";
    echo $_SERVER['HTTP_HOST'] . ":" . $port . "/login/\" ";
    echo "method=POST>";
    ?>
    User: <input type=text name=user><br>
    Pass: <input type=password name=pass><br>
    <?php
    echo "<input type=hidden name=failurl value=\"http://" ;
    echo $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
    echo "?failed=1\">";
    ?>
    <input type=submit value=Login>
    </form>
    </html>

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Here's a related bug report: http://bugzilla.cpanel.net/show_bug.cgi?id=6111

    If you still experience this on the latest builds, please post a comment to that entry and/or submit a support ticket.

  3. #3
    Member
    Join Date
    Mar 2008
    Posts
    7

    Default

    I have cPanel's latest build 11.18.3 and still experiencing this issue. I will submit a support ticket.

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 02-11-2011, 10:14 AM
  2. custom login page...
    By dipp02 in forum cPanel Developers
    Replies: 14
    Last Post: 11-01-2008, 10:25 AM
  3. redirect on login success (custom login)
    By adm.iuri in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 05-21-2008, 01:57 PM
  4. Custom Login Page
    By MixedMedia in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-02-2008, 10:26 PM
  5. how to change root login user to other for Cpanel WHM login page?
    By onnetsupport in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-07-2006, 09:21 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube