Need guidance on RewriteRule for Opencart Site -


i have built new opencart shop in sub-directory of old root domain : ie. http://www.old-domain.com/opencart have new domain name points ok sub-directory: ie. http://www.new-domain.com (i have updated both config.php files correctly) however, clicking on internal link shows old-domain url in address bar.

so need guidance in replacing (rewriting) old name new 1 - whilst still retaining correct paths etc. have done fair amount of research, , tried , in htaccess without success. thank you.

the problem opencart installed on old domain url address set constant (define) within config files.

if want change it, go open these 2 files:

  • <opencart_root>/config.php
  • <opencart_root>/admin/config.php

and edit these defines:

// http define('http_server', 'http://olddomain.com/admin/'); define('http_catalog', 'http://olddomain.com/'); define('http_image', 'http://olddomain.com/image/');  // https define('https_server', 'http://olddomain.com/admin/'); define('https_catalog', 'http://olddomain.com/'); define('https_image', 'http://olddomain.com/image/'); 

to

// http define('http_server', 'http://newdomain.com/admin/'); define('http_catalog', 'http://newdomain.com/'); define('http_image', 'http://newdomain.com/image/');  // https define('https_server', 'http://newdomain.com/admin/'); define('https_catalog', 'http://newdomain.com/'); define('https_image', 'http://newdomain.com/image/'); 

(the config file within root wouldn't have /admin/ urls part...)

this should solve problem.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -