Copy (not move) the index.php residing in the CS-Cart folder to the root folder.
Edit the copied ‘index.php’ file (the one in the root folder) and change 2 lines of code to accommodate the change in path. Make sure you revise the path of ‘prepare.php’ and ‘init.php’ to reflect the directory path as to where they reside in CS-Cart
// changing directory from ‘./prepare.php’; to ‘cs-cart/prepare.php’;
// changing directory from ‘./init.php’: to ‘cs-cart/init.php’;
require ‘cs -cart/init.php’;
Rename your current ‘index.html’ or ‘default.html’ file found in the root directory to ‘index-old.html’ or ‘default-old.html’ so that the new ‘index.php’ will be recognized as the new site index file
Congratulations, you have now with minimum effort reconfigured your site to automatically enter CS-Cart when you call it.
What is nice is that the copy of ‘index.php’ in your root directory will retain any changes you make in altering the original home page in the Admin Panel → Design → Site Layout except for one thing – pictures.
If you have included pictures in the ‘Text Displayed On The Store Home Page’, you must place and link to those pictures in a folder in CS-Cart (ie. /cs-cart/myhomepgpics). Then you must Copy (not move) that folder into the root directory so that the link from the ‘cs-cart/index.php’ to the pictures is mirrored in the link from the root folder/index.php to the pictures.
Make folder ‘cs-cart/myhomepgpics/’
Upload your pics in this folder
From the “Text Displayed on the Store Home Page” code, make sure you link to the pics in ./myhomepgpics/'
Copy the folder ‘cs-cart/myhomepgpics’ to ‘/myhomepgpics/’
YOU ARE NOW IN BUSINESS
How does it work?
Since we copied the cs-cart’s ‘index.php’ into the root directory and substituted it for our old ‘index.html’ file, when we type in our web-site’s URL we are taken to ‘index.php’.
Since we altered the 2 references to ‘prepare.php’ and ‘init.php’ within ‘index.php’ to include the files in the CS-Cart Folder, it uses the info stored in CS-Cart to create the page.
An elegant solution to a problem that should have really been easily addressed in the development of the CS-Cart program, that is, we should be able to configure where we want to put our ‘index.php’ file (it should not be married to the CS-Cart folder)
Great solution, seeker! This works beautifully. I’ve been trying to find a way around moving my whole cart for months. And you’re absolutely right - putting a redirect command in your index.html is a huge no-no when it comes to SEO. My stats have been terrible.
Thanks for the post and for the great detailed explanation.
Thanks to Seeker for the steps above. For the life of me, I couldn’t get my .htaccess files to work but I what was described above with index.php and now have my domain redirecting to the lower subdirectory.
I thought going live was supposed to be easy! It’s been anything but…
I couldn’t get my files ftp’d to the root in an effective manner, Indy, and really want to get my store up and running at this point. I may try addressing the issue at a later time but for now I’m going to leave it the way seeker described it. Is it really that bad to point SEO to a lower directory? I actually just had a hosted cart that was linked off my home page of my site and had pretty good ranking for many of my products considering I never paid for any PPC or paid anyone for SEO, either.
I guess I’m just frustrated because all of my ftp programs kept taking hours and hours to move the files to root and I couldn’t figure out why.
I may need to ask for help from someone or just wait until my hosting account updates to cPanel which should be soon. I’m hoping that will make it easier for me to move my files around on the server.
Sure, through a FTP program and slow connection, that can make some one tierd. With cPanel it can be done very quickly.
If your cart live in a subdirectory it doesn’t mean there is something BAD regarding SEO, but a root will be technically ever better. Sure that the results are not visible in a few days but maybe in a few months or years you will see your competitors about your position and maybe the one number of difference would be your subdirectory.
And it’s matter if you are on the place #4 or #3, because the CTR difference is huge.
You could also send a support ticket to your hosting provider requesting them to move your CS-Cart folder to the root directory of your store.
They may not even charge you for this!
Other thing is that you will be far better off moving your store to the root now rather than leaving it in a sub-directory & then deciding some time down the road to move it to the root because then you will have to be concerned with whatever seo rankings you have gathered along the way.
Thanks, Struck! I may do that…they’re a very customer service oriented hosting company so I’m sure they will assist if I ask. They may even go ahead and update my account to cPanel since it will make life easier for me.