Change Xenforo Admin Panel URL Tutorial

Discussion in 'Internet & Networking' started by securityhope, Apr 19, 2017.

  1. securityhope

    securityhope Administrator Staff Member

    Joined:
    Aug 3, 2016
    Messages:
    1,241
    Likes Received:
    0
    Trophy Points:
    36
    Step 1:

    In your admin panel Appearance Styles {your theme name} Templates example: test.php

    11.png

    Make ctrl f to search, typed admin.php and Search launched.

    replace admin.php with your filename test.php.

    Step 2:

    In your FTP Rename the admin.php file you want example: test.php

    Then in the library / XenForo / Craft link.php

    Make ctrl f to search, typed admin.php and Search launched

    Rename admin.php your php just before example Rename test.php

    Code:
        public static function buildAdminLink($type, $data = null, array $extraParams = array())
        {
            $type = self::_checkForFullLink($type, $fullLink, $fullLinkPrefix);
    
            $link = self::_buildLink('admin', $type, $data, $extraParams);
            $queryString = self::buildQueryString($extraParams);
    
            if ($queryString !== '' && $link !== '')
            {
                $append = $link . '&' . $queryString;
            }
            else
            {
                // 1 or neither of these has content
                $append = $link . $queryString;
            }
    
            if (($hashPos = strpos($type, '#')) !== false)
            {
                $append .= substr($type, $hashPos);
            }
    
            $outputLink = 'admin.php' . ($append !== '' ? '?' : '') . $append;
            if ($fullLink)
            {
                $outputLink = $fullLinkPrefix . $outputLink;
            }
    
            return $outputLink;
        }
    You can see this line in there which specifies the file name:

    Code:
    $outputLink = 'admin.php' . ($append !== '' ? '?' : '') . $append;
    If you change the file name here and then rename the file on your server then that will change the location of the Admin CP.
     

Share This Page

Share