Post by KDSLABY » Fri Sep 13, 2019 9:18 am

My current domain is pointing to the root directory on the server and my existing html site.

When I pointed it to the sub directory where the new OC files are the OC website didn't display any images and the links did work. If I leave the domain name pointed at my old html side and simply type in the address of the new site it comes up, no problem. Why wouldn't pointing the domain name to the new sub directory work too?
I just sent an email to my web host so they haven't responded but this issue threw me.

ks

New member

Posts

Joined
Tue Aug 27, 2019 10:40 am

Post by uksitebuilder » Fri Sep 13, 2019 1:59 pm

Check your config.php and admin/config.php files to make sure URLs are correct

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by kestas » Fri Sep 13, 2019 2:22 pm

uksitebuilder wrote:
Fri Sep 13, 2019 1:59 pm
Check your config.php and admin/config.php files to make sure URLs are correct
Yes they should be changed like this:
config.php

Code: Select all

 define('HTTP_SERVER', 'http://www.example.com/subfolder_name/');

    // HTTPS
    define('HTTPS_SERVER', 'http://www.example.com/subfolder_name/');

    // DIR
    define('DIR_APPLICATION', '/home/user/public_html/subfolder_name/catalog/');
    define('DIR_SYSTEM', '/home/user/public_html/subfolder_name/system/');
    define('DIR_IMAGE', '/home/user/public_html/subfolder_name/image/');
    define('DIR_STORAGE', '/home/user/storedata1/storage/');
    define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
    define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
    define('DIR_CONFIG', DIR_SYSTEM . 'config/');
    define('DIR_CACHE', DIR_STORAGE . 'cache/');
    define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
    define('DIR_LOGS', DIR_STORAGE . 'logs/');
    define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
    define('DIR_SESSION', DIR_STORAGE . 'session/');
    define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
Subfolder admin config.php should be:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.example.com/subfolder_name/admin/');
define('HTTP_CATALOG', 'http://www.example.com/subfolder_name/');

// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/subfolder_name/admin/');
define('HTTPS_CATALOG', 'http://www.example.com/subfolder_name/');

// DIR
define('DIR_APPLICATION', '/home/user/public_html/subfolder_name/admin/');
define('DIR_SYSTEM', '/home/user/public_html/subfolder_name/system/');
define('DIR_IMAGE', '/home/user/public_html/subfolder_name/image/');
define('DIR_STORAGE', '/home/user/storedata1/storage/');
define('DIR_CATALOG', '/home/user/public_html/subfolder_name/catalog/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by paulfeakins » Fri Sep 13, 2019 6:55 pm

uksitebuilder wrote:
Fri Sep 13, 2019 1:59 pm
Check your config.php and admin/config.php files to make sure URLs are correct
And check rewrite base in .htaccess

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by by mona » Fri Sep 13, 2019 7:08 pm

and it could just be that propagation has not taken effect yet ..

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: DigitCart and 100 guests