Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Moving the catalogue from root to /shop/


Guest

Recommended Posts

Hi,

I am wondering whether there is an easy way to move my catalogue from the root folder to /shop/ if the files are relocated, I am assuming all the hyperlinks/image refs etc. will no longer work and will need updating. Has anyone done this before and how much altering of files would be involved?

 

Thanks in advance.

 

Colin G.

Link to comment
Share on other sites

You just need to move the folders/files from the root to the folder and then edit both configure.php files - adding shop/ to the http_catalog path and to the DIR_FS paths.

 

Vger

 

Thanks for the quick response, and sorry to sound like a simpleton, but which files and folders will I need to move, all of them or just the public_html

 

and which lines in the configure.php files just the line http_cataog path and all the dir_fs paths?

 

Thanks

Colin G.

Link to comment
Share on other sites

Thanks for the quick response, and sorry to sound like a simpleton, but which files and folders will I need to move, all of them or just the public_html

 

and which lines in the configure.php files just the line http_cataog path and all the dir_fs paths?

 

Thanks

Colin G.

 

Yes all the files.

 

You gotta change in includes/configure.php to:

  define('DIR_WS_HTTP_CATALOG', '/shop/');
 define('DIR_WS_HTTPS_CATALOG', '/shop/');
 define('DIR_FS_CATALOG', '/absolute path to shop/');

You gotta change in admin/includes/configure.php to:

  define('DIR_WS_CATALOG', '/shop/');

Backup before making changes. Backup before making changes! Backup before making changes!!

 

You did do a backup? eh?

Link to comment
Share on other sites

Yes all the files.

 

You gotta change in includes/configure.php to:

  define('DIR_WS_HTTP_CATALOG', '/shop/');
 define('DIR_WS_HTTPS_CATALOG', '/shop/');
 define('DIR_FS_CATALOG', '/absolute path to shop/');

You gotta change in admin/includes/configure.php to:

  define('DIR_WS_CATALOG', '/shop/');

 

Hi,

Thanks for that, but I am getting page not found errors on both the admin page and the web page. Are there any other files that need to be updated.

 

Thanks

Colin G.

Link to comment
Share on other sites

Still no success with getting the pages to display, if the catalog has moved to /shop, then shouldn't all refs change, like the DIR_FS_DOCUMENT_ROOT to '/home/mysite/shop/public_html'

 

I have attached my includes files in case anyone can spot the problem. Do I need to leave any files in the root directory?

 

Admin includes/configure.php is:

 

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://mysite.co.uk'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://mysite.co.uk');

define('HTTPS_CATALOG_SERVER', 'https://mysite.co.uk');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://mysite.co.uk'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://mysite.co.uk');

define('HTTPS_CATALOG_SERVER', 'https://mysite.co.uk');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/home/mysite/public_html'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/home/mysite/public_html/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/shop/'); // absolute path required

define('DIR_FS_CATALOG', '/home/mysite/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 . 'backups/');

 

 

includes/configure.php is:

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://mysite.co.uk'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://mysite.co.uk'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'mysite.co.uk');

define('HTTPS_COOKIE_DOMAIN', 'mysite.co.uk');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/shop/');

define('DIR_WS_HTTPS_CATALOG', '/shop/');

define('DIR_WS_IMAGES', 'images/');

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/mysite/shop/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

 

 

Thanks

 

Colin G.

Link to comment
Share on other sites

Ok in the includes/configure.php file:

 

In the admin/includes/configure.php

 

change:

define('DIR_FS_CATALOG', '/home/mysite/public_html/');

 

to

define('DIR_FS_CATALOG', '/home/mysite/public_html/shop/');

 

I could not see any other errors at first glance but I don't have a ton of time right now.

 

Gotta go cook breakfast for my boys!!

Backup before making changes. Backup before making changes! Backup before making changes!!

 

You did do a backup? eh?

Link to comment
Share on other sites

Ok in the includes/configure.php file:

 

In the admin/includes/configure.php

 

change:

define('DIR_FS_CATALOG', '/home/mysite/public_html/');

 

to

define('DIR_FS_CATALOG', '/home/mysite/public_html/shop/');

 

I could not see any other errors at first glance but I don't have a ton of time right now.

 

Gotta go cook breakfast for my boys!!

 

Woohoo!!! it worked thanks!!!

 

Enjoy breakfast!!

 

Colin G.

Link to comment
Share on other sites

what about moving domains from /shop to public_html/....... I want my customers to type in http://mydomain.com and get the /shop/catalog/index.php

 

Do the reverse of the above.

 

Edit both configure.php files and remove the reference to the subdirectory.

 

If you have files in the root already rename or move them if you dont want the ones with the same name overwritten, or if you dont want other index.html or default.html etc files interfering.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...