简体   繁体   中英

Can't access Opencart backend

I can't login to my Opencart Admin Panel because when I navigate to www.mysite.com/admin it is redirecting to the home page. I have disabled the .htaccess file and php.ini file. As you can see from the config file, I am hosting it on a subdomain maybe that could be the cause of the problem, I am not sure. Here is my config.php

    <?php
    // HTTP
    define('HTTP_SERVER', 'http://inaden.360mustang.com/');

    // HTTPS
    define('HTTPS_SERVER', 'http://inaden.360mustang.com/');

    // DIR
    define('DIR_APPLICATION', '/home/mustang/public_html/inaden/catalog/');
    define('DIR_SYSTEM', '/home/mustang/public_html/inaden/system/');
    define('DIR_LANGUAGE', '/home/mustang/public_html/inaden/catalog/language/');
    define('DIR_TEMPLATE', '/home/mustang/public_html/inaden/catalog/view/theme/');
    define('DIR_CONFIG', '/home/mustang/public_html/inaden/system/config/');
    define('DIR_IMAGE', '/home/mustang/public_html/inaden/image/');
    define('DIR_CACHE', '/home/mustang/public_html/inaden/system/cache/');
    define('DIR_DOWNLOAD', '/home/mustang/public_html/inaden/system/download/');
    define('DIR_UPLOAD', '/home/mustang/public_html/inaden/system/upload/');
    define('DIR_MODIFICATION', '/home/mustang/public_html/inaden/system/modification/');
    define('DIR_LOGS', '/home/mustang/public_html/inaden/system/logs/');
//database details omitted
?>

and here is my admin/config.php

<?php
// HTTP
define('HTTP_SERVER', 'http://inaden.360mustang.com/admin/');
define('HTTP_CATALOG', 'http://inaden.360mustang.com/');

// HTTPS
define('HTTPS_SERVER',  'http://inaden.360mustang.com/admin/');
define('HTTPS_CATALOG', 'http://inaden.360mustang.com/');

// DIR
define('DIR_APPLICATION', '/home/mustang/public_html/inaden/admin/');
define('DIR_SYSTEM', '/home/mustang/public_html/inaden/system/');
define('DIR_LANGUAGE', '/home/mustang/public_html/inaden/admin/language/');
define('DIR_TEMPLATE', '/home/mustang/public_html/inaden/admin/view/template/');
define('DIR_CONFIG', '/home/mustang/public_html/inaden/system/config/');
define('DIR_IMAGE', '/home/mustang/public_html/inaden/image/');
define('DIR_CACHE', '/home/mustang/public_html/inaden/system/cache/');
define('DIR_DOWNLOAD', '/home/mustang/public_html/inaden/system/download/');
define('DIR_UPLOAD', '/home/mustang/public_html/inaden/system/upload/');
define('DIR_LOGS', '/home/mustang/public_html/inaden/system/logs/');
define('DIR_MODIFICATION', '/home/mustang/public_html/inaden/system/modification/');
define('DIR_CATALOG', '/home/mustang/public_html/inaden/catalog/');

//database details omitted 
?>

I've had this problem also, but after investigating I noticed that there is a file in admin/config.php which has been added for security and another to only allow a certain IP address to access the admin area. After editing them accordingly I had access to my admin area once again. Will definitely leave that code in for security purposes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM