UncleSteve Posted June 22, 2007 Share Posted June 22, 2007 I have two domains set up on two seperate servers/webspace, and both running OSC. The one site is myname.CO.UK and the other is myname.COM Is it possible to run both sites off the same database with the above set-up, or what changes would I need to make to run from the same database? Thanks for looking and any feedback :) Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 22, 2007 Share Posted June 22, 2007 The host where the database is located has to offer the option of remote access. If they do, then you need to setup whichever configure files that are on different servers to remotely access the databass. You will probably need to ask your host since you will need the address to access the database and they may require you use a certain IP. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
UncleSteve Posted June 22, 2007 Author Share Posted June 22, 2007 Thank you Jack, that's a good start. I'll investigate further on the remote access. Thanks Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
web-project Posted June 22, 2007 Share Posted June 22, 2007 normally in webhosting control panel (cpanel) you can set the permission to access the MySQL form specific IP address or any network, but the server can be protected by firewall rules in this case you will need to contact the technical support to allow the connection between A website & B website. Quote Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
UncleSteve Posted June 23, 2007 Author Share Posted June 23, 2007 I've been to my host and they seem comfortable with the idea of two domains (mydomain.co.uk & mydomain.com) and one database, so without getting too tecky I assume both configure files need to be modified, so can anyone advise on what changes I need to make please? This is my catalog/admin/configure.php <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://MYDOMAIN.co.uk'); // eg, http://localhost - should not be empty for productive servers define('HTTP_CATALOG_SERVER', 'http://MYDOMAIN.co.uk'); define('HTTPS_CATALOG_SERVER', 'https://MYDOMAIN.co.uk'); define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/home/MYUSERNAME/public_html'); // where the pages are located on the server define('DIR_WS_ADMIN', '/store/admin/'); // absolute path required define('DIR_FS_ADMIN', '/home/MYUSERNAME/public_html/store/admin/'); // absolute path required define('DIR_WS_CATALOG', '/store/'); // absolute path required define('DIR_FS_CATALOG', '/home/MYUSERNAME/public_html/store/'); // absolute path required define('DIR_WS_IMAGES', 'images/'); //define('DIR_WS_CATALOG_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/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'MYUSERNAME_osc1'); define('DB_SERVER_PASSWORD', '1234567890'); define('DB_DATABASE', 'MYUSERNAME_osc1'); define('USE_PCONNECT', 'false'); // use persisstent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> Thanks in advance for any help and guidence you can give :) Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 23, 2007 Share Posted June 23, 2007 You need to change the first section to address the proper domain name as usual. The important part is to change the DB_SERVER entry to the proper address, which you need to get from your host. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
UncleSteve Posted June 27, 2007 Author Share Posted June 27, 2007 You need to change the first section to address the proper domain name as usual. The important part is to change the DB_SERVER entry to the proper address, which you need to get from your host. Jack Hi Jack, What I have now tried, in the config files on the 'mydomain.COM' 'is to change the Domains from 'mydomain.COM' to 'mydomain.CO.UK'. I have also changed the db user name and pw to the one in the .CO.UK domain. Unfortunately all the links point to the wrong domain. I've just noticed, you mention 'proper address'. So on the line where it says define('DB_SERVER', 'localhost'); change it to something like... define('DB_SERVER', 'http://mydomain.CO.UK.......'); Or what ever my host says? Or what do you suggest to correct the links etc? Thanks Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 27, 2007 Share Posted June 27, 2007 Are the files of the two shops different or is one a copy of the other? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
UncleSteve Posted June 27, 2007 Author Share Posted June 27, 2007 The two sites are the same, bar the config files which have .com or .co.uk and the db user names are different, all dependant on which site they're loaded too. Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
satish Posted June 27, 2007 Share Posted June 27, 2007 Assuming that the two sites have a set code for themselves plus one data base. You need to modify the following 1)define('HTTP_CATALOG_SERVER', 'http://MYDOMAIN.co.uk'); 2) define('HTTPS_CATALOG_SERVER', 'https://MYDOMAIN.co.uk'); 3)cookies path 4)FS define 5)WS defines same for admin paths too. Satish Quote Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
UncleSteve Posted June 27, 2007 Author Share Posted June 27, 2007 Assuming that the two sites have a set code for themselves plus one data base. You need to modify the following 1)define('HTTP_CATALOG_SERVER', 'http://MYDOMAIN.co.uk'); 2) define('HTTPS_CATALOG_SERVER', 'https://MYDOMAIN.co.uk'); 3)cookies path 4)FS define 5)WS defines same for admin paths too. Satish Thanks for the help, with your help I've got it sorted :) Thanks Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 27, 2007 Share Posted June 27, 2007 That's not the correct way to do it. One or both of the sites stand to get punished by the search engines. If they sites are identicle, then just repoint one domain name to the other server and issue a 301 redirect to the search engines. That will prevent the sites from having problems with duplicate cotent and will prevent you from having to maintain two sets of files. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
UncleSteve Posted July 4, 2007 Author Share Posted July 4, 2007 That's not the correct way to do it. One or both of the sites stand to get punished by the search engines. If they sites are identicle, then just repoint one domain name to the other server and issue a 301 redirect to the search engines. That will prevent the sites from having problems with duplicate cotent and will prevent you from having to maintain two sets of files. Jack Hi Jack, Tried a 301, but it only redirects the main url. Established urls such as mydomain.COM/store/product001.htm still stays at the original site, rather than forward to mydomain.CO.UK/store/product001.htm. I'm wondering if the search engines will note the redirect and apply it to all the COM url's? I'll leave it in place and see what happens. Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
GemRock Posted July 4, 2007 Share Posted July 4, 2007 ...Tried a 301, but it only redirects the main url. Established urls such as mydomain.COM/store/product001.htm still stays at the original site, rather than forward to mydomain.CO.UK/store/product001.htm... Your 301 syntax may not be (entirely) correct. SEs follow the same 301 rule you set up. Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
UncleSteve Posted July 5, 2007 Author Share Posted July 5, 2007 Your 301 syntax may not be (entirely) correct. SEs follow the same 301 rule you set up.Ken This is what I have... Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^mydomain.com [nc] rewriterule ^(.*)$ http://www.mydomain.co.uk/store/$1 [r=301,nc] I was wondering if I removed the third line, in the hope it would catch all. But I expect its not that simple? Thanks Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
GemRock Posted July 5, 2007 Share Posted July 5, 2007 Why you pay to host two identical sites only to have one of them completely redirect to the other without any chance/intend to have anyone to visit it? So, instead of fixing these lines, I would suggest you do a redirect at the domain level, either use the registrar's redirect service (if available) or use domain alias at the site control panel. Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
UncleSteve Posted July 5, 2007 Author Share Posted July 5, 2007 Why you pay to host two identical sitesI have a reseller hosting package so costs no extra. only to have one of them completely redirect to the other without any chance/intend to have anyone to visit it?The reason was that I encountered problems with one host messing me about, so I bought a COM version of my domain elsewhere to set up a site on another host as I knew I would have problems when it came to move my COUK domain. So, instead of fixing these lines, I would suggest you do a redirect at the domain level, either use the registrar's redirect service (if available) or use domain alias at the site control panel.Ken domain alias at the site control panel. - Can you give more info on this please? Thanks Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 5, 2007 Share Posted July 5, 2007 domain alias at the site control panel. - Can you give more info on this please?This is what I mentioned previously. If you use CPanel, there is an opton to add an Addon domain. You just set up the directory on the server and point the domain name to that directory using the Addon option. In the directory, you place an .htaccess file that creates a 301 redirect to the main domain. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.