Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changed store to a different folder now SSL links to old site


sinful69er

Recommended Posts

Hi Guys,

 

I have this annoying problem that might be a simple one.

 

I moved everything from the root folder to /xyz.com(for example) because I changed the domain name of the store. I changed the /xyz.com/includes/config.php file and /xyz.com/admin/includes/config.php files to the corresponding domain name change.

 

The problem is that when I go to my secure page with shared SSL i hover over all my links and it links back to the old domain name for some strange reason.

 

root/xyz.com/includes/config.php code

define('HTTP_SERVER', 'http://xyz.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://mustang.turboservers.com.au/'); // SHARED SSL
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'xyz.com');
 define('HTTPS_COOKIE_DOMAIN', 'mustang.turboservers.com.au/~neilop');
 define('HTTP_COOKIE_PATH', 'xyz.com/');
 define('HTTPS_COOKIE_PATH', 'xyz.com/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_IMAGES_LARGE', 'images/large/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/neilop/public_html/xyz.com');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

root/xyz.com/admin/includes/config.php

 

define('HTTP_SERVER', 'http://xyz.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_CATALOG_SERVER', 'http://xyz.com');
 define('HTTPS_CATALOG_SERVER', 'https://mustang.turboservers.com.au/');
 define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', '/home/neilop/public_html/xyz.com/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/admin/'); // absolute path required
 define('DIR_FS_ADMIN', '/home/neilop/public_html/admin/'); // absolute pate required
 define('DIR_WS_CATALOG', '/'); // absolute path required
 define('DIR_FS_CATALOG', '/home/neilop/public_html/'); // absolute path required
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backup/');

 

so when the https://mustang.turboservers.com.au/ secure site is visited all the links are pointing to the old site instead of new xyz.com

 

any help is greatly appreciated

Link to comment
Share on other sites

Check the config file on the server to be sure it says what you THINK it says.

 

If you edit it locally and FTP to the server sometimes permissions on the server don't allow the FTP program to overwrite the file.

 

And you can check for this:

 

In the includes FOLDER (catalog and admin) where the normal configure.php files are there is a FOLDER named local

 

On some installs there may be a configure.php inside the local FOLDER (catalog and admin)

 

If there is, anything in it overrides anything in the normal configure.php files.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

The links come from:

 

1. Data in the config file(s).

 

2. The category/manufacturers cache.

 

3. Rewrites in any .htaccess files.

 

4. Hard coded links in the php source code.

 

5. Active redirects in your web host cPanel.

 

Take your pick.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Give this a shot.

 

root/xyz.com/includes/config.php code

 define('HTTP_COOKIE_DOMAIN', '.xyz.com');    

 define('HTTP_COOKIE_PATH', '/xyz.com/');
 define('HTTPS_COOKIE_PATH', '/xyz.com/');

 define('DIR_WS_HTTP_CATALOG', '/xyz.com/');
 define('DIR_WS_HTTPS_CATALOG', '/xyz.com/');

 define('DIR_FS_CATALOG', '/home/neilop/public_html/xyz.com/');

 

root/xyz.com/admin/includes/config.php

 


 define('DIR_FS_DOCUMENT_ROOT', '/home/neilop/public_html/'); 

 define('DIR_WS_ADMIN', '/xyz.com/admin/'); 
 define('DIR_FS_ADMIN', '/home/neilop/public_html/xyz.com/admin/'); 

 define('DIR_WS_CATALOG', '/xyz.com/'); 
 define('DIR_FS_CATALOG', '/home/neilop/public_html/xyz.com/'); 

Link to comment
Share on other sites

Give this a shot.

 

root/xyz.com/includes/config.php code

 define('HTTP_COOKIE_DOMAIN', '.xyz.com');    

 define('HTTP_COOKIE_PATH', '/xyz.com/');
 define('HTTPS_COOKIE_PATH', '/xyz.com/');

 define('DIR_WS_HTTP_CATALOG', '/xyz.com/');
 define('DIR_WS_HTTPS_CATALOG', '/xyz.com/');

 define('DIR_FS_CATALOG', '/home/neilop/public_html/xyz.com/');

 

root/xyz.com/admin/includes/config.php

 


 define('DIR_FS_DOCUMENT_ROOT', '/home/neilop/public_html/'); 

 define('DIR_WS_ADMIN', '/xyz.com/admin/'); 
 define('DIR_FS_ADMIN', '/home/neilop/public_html/xyz.com/admin/'); 

 define('DIR_WS_CATALOG', '/xyz.com/'); 
 define('DIR_FS_CATALOG', '/home/neilop/public_html/xyz.com/'); 

 

Hi Bryce,

 

no luck unfortunately

 

i changed the whole file and change individual lines

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

to

 

define('DIR_WS_HTTP_CATALOG', '/xyz.com/');

define('DIR_WS_HTTPS_CATALOG', '/xyz.com/');

 

it will add the extra domain name so it will be xyz.com/xyz.com/account.php (for example)

:( so it is picking up the changes but not the right one. It only happens when it changes to the https server (https://mustang.turboservers.com.au/~neilop) all the links from then on will change to the old one but other then that its fine... xyz.com/shopping_cart.php xyz.com/logout.php etc.

 

will it be easier if i pasted the link?

Link to comment
Share on other sites

The links come from:

 

1. Data in the config file(s).

 

2. The category/manufacturers cache.

 

3. Rewrites in any .htaccess files.

 

4. Hard coded links in the php source code.

 

5. Active redirects in your web host cPanel.

 

Take your pick.

 

I have checked the cache folders in both the root folder and the xyz.com folder nothing seems to be out of the ordinary.

 

.htaccess i have only added

RewriteCond %{HTTP_HOST} ^xyz.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.xyz.com$
RewriteRule ^/?$ "http\:\/\/www\xyz\.com" [R=301,L]

 

i pretty sure i havent hard coded anything in like that

 

redirects are all directing properly from cpanel

Link to comment
Share on other sites

The only other place I am aware of that links can "come from" is your temporary Internet files.

 

You might hold the <ctrl> key down while doing a page refresh in your browser to force the server to reload the page fully.

 

You may be looking at your PC's cache of the page.

 

I've given you a check list of all the places I am aware of that affect the linking in osC.

 

I know of no other.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Thanks germ!

 

I changed the includes/config file

from

define('DIR_WS_HTTPS_CATALOG', '/');

to

define('DIR_WS_HTTPS_CATALOG', '/xyz.com/');

and it works fine

but now when i login to the site it points to the old site...

 

i even looked at the line

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

and changed the

define('DIR_WS_CATALOG', '/xyz.com/');

 

so technically the address bar will look like

https://mustang.turboservers.com.au/~neilop/xyz.com/index.php

 

but only shows

https://mustang.turboservers.com.au/~neilop/index.php

 

am i looking at the right place?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...