Zen Cart Logo
Forums / Basic Configuration / Changing /index.php to point to /store/

Changing /index.php to point to /store/

Locked

Views: 2,143

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
25 Jul 2010, 5:03 PM
#1
scott_see avatar

scott_see

New Zenner

Join Date:
Apr 2005
Location:
White Salmon, WA
Posts:
60
Plugin Contributions:
0

Changing /index.php to point to /store/

DrByte,

That was some great advice. I'm moving from / to /store/ so I did a fresh install in /store/, then took the old database and restored it to the new database, and then ran a database upgrade. Worked great!

But, not I'm trying to get /index.php to link to /store/

So now I've got /index.php pointing to the old Zen Cart, and /store/ pointing to a duplicate. But how do I get /index.php to link to the new store?

Thanks,

25 Jul 2010, 5:04 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing /index.php to point to /store/

scott_see:

I'm moving from / to /store/Why?
scott_see:

But, not I'm trying to get /index.php to link to /store/Again, why?

If all you want to do is make your /index.php point to your /store/ folder, why did you move everything to the /store/ folder in the first place?

25 Jul 2010, 5:10 PM
#3
scott_see avatar

scott_see

New Zenner

Join Date:
Apr 2005
Location:
White Salmon, WA
Posts:
60
Plugin Contributions:
0

Re: Changing /index.php to point to /store/

I moved and upgraded to /store/ so that I could test it out and get it working side-by-side with the old store at /. Wouldn't it be safer not to overwrite the original?

If there's a way to get /index.php to refer to /store/ then the original will remain untouched. And the next upgrade will be even easier. I'm kind of looking down the road with this strategy.

Just do a fresh install in a new directory, restore the old database into the new empty one, run a database upgrade, copy template files, and then just point /index.php to the new folder.

Safe and easy. Is my reasoning sound?

25 Jul 2010, 5:23 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing /index.php to point to /store/

scott_see:

Just do a fresh install in a new directory, restore the old database into the new empty one, run a database upgrade, copy template files, and then just point /index.php to the new folder.

Safe and easy. Is my reasoning sound?

Oh, so you're trying to skip following the official upgrade instructions so you can confidently miss merging your customizations from one to the next?

25 Jul 2010, 5:34 PM
#5
scott_see avatar

scott_see

New Zenner

Join Date:
Apr 2005
Location:
White Salmon, WA
Posts:
60
Plugin Contributions:
0

Re: Changing /index.php to point to /store/

I think I'm following the upgrade instructions right through where it says, "When satisfied that all is OK, go live." Then it says, "renaming 'store_new' to 'store'"

I must admit, I get lost here. It seems there's an assumption that the store is installed in a subfolder, which is what I'm trying to do.

I don't have any customizations besides a template.

Am I going about this wrong?

I'd be happy to follow the instructions, which I've read and re-read, but "go live" and "rename 'store_new" to 'store'" doesn't make sense to me if Zen is installed in / originally.

Am I reading the wrong upgrade instructions?

25 Jul 2010, 5:57 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing /index.php to point to /store/

Oh, I see. Maybe you are actually talking about copying files you've already merged and upgraded. It wasn't clear from your first posts.

The upgrade instructions do talk about setting up your site in a separate folder for staging the upgrade and preparing all the files for use on the live site.
Whether you want to rename a folder to take the changes "live", or simply copy all the new files into the existing live store's folder, is up to you.

When I'm doing upgrades, I do all the testing with a copy of everything from the live site onto a separate server, not just in a separate folder. Then, once I'm happy that it's all working fine on the test site, I repeat the upgrade on the live site, including copying all the files into the new site. It's not "necessary" to have a "/store/" and "/store_new/" folder to rename, although that will work if your store is actually in a folder named "/store/".

If your store is in the "root" of the site (ie: /index.php is part of your Zen Cart store) then you could do your testing and staging in a subfolder (called anything, whether store_new or store or bobby or testing ... anything) and then copy all the files into the main folder when ready to cut over.

There are lots of ways to do it. Pick one that works for you. But don't skip the merging of customizations from old to new. That's the part most people get lazy in, just because it takes time and feels daunting.

25 Jul 2010, 6:29 PM
#7
scott_see avatar

scott_see

New Zenner

Join Date:
Apr 2005
Location:
White Salmon, WA
Posts:
60
Plugin Contributions:
0

Re: Changing /index.php to point to /store/

Yes, I ran WinMerge. Quite right, I can see a lot of people skipping that step.

So now that I've got my Zen Cart working in /store/ I could copy all to root and tweak the two configuration.php files.

I got that.

But is there a way to make /index.php point to the /store/ folder so that I can leave my store in /store/?

I've tried changing some of the values in /index.php from / to /store/, but it's not working. Or should I abandon this approach?

And hey, I appreciate you being there for us all on a beautiful Sunday. We really should all be out enjoying the sun.

25 Jul 2010, 8:34 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing /index.php to point to /store/

Is there any reason you want to leave everything in the /store/ folder, other than the conveniences discussed above?

Keep in mind that moving the folder into different paths that show up differently in the browser URL address bar ... can mess with your search engine rankings, so should be done with great caution.

25 Jul 2010, 8:43 PM
#9
scott_see avatar

scott_see

New Zenner

Join Date:
Apr 2005
Location:
White Salmon, WA
Posts:
60
Plugin Contributions:
0

Re: Changing /index.php to point to /store/

No, not so much security, but rather safety. If I overwrite the zen cart at the root directory, then I run the risk that I've messed something up in the installation and then proceeded to overwrite my working cart. I'd be inclined to just download and backup, but my Internet connection is so slow. I live in the middle of nowhere.

I'm not worried about /index.php pointing to stuff inside /store/ from an SEO perspective. Once someone (or a google bot) clicks on /index.php, they'd be taken to /store/ and then stay there. I don't think Google would mind that.

But if getting /index.php to point to /store/ is difficult, I'll abandon the idea.

Thanks,

25 Jul 2010, 9:08 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing /index.php to point to /store/

Depending on your hosting configuration it may be possible to have your domain pointed to be served from the /store/ folder. But then changing it later gets complicated again.
You could set up a small redirector inside the /index.php to point to /store/, but Google and other search engines don't like that.

I recommend just serving it all from /

25 Jul 2010, 9:16 PM
#11
scott_see avatar

scott_see

New Zenner

Join Date:
Apr 2005
Location:
White Salmon, WA
Posts:
60
Plugin Contributions:
0

Re: Changing /index.php to point to /store/

That's what I'll do. / it is

I tried the 301 permanent redirect, and that didn't work. I was hoping I could just tweak /index.php so that it grabbed SSIs from /store/ and links pointed to the /store/ subfolder.

But I guess that's not as easy as I thought it might be.

25 Jul 2010, 9:21 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing /index.php to point to /store/

I'll add as well that it'll look better in the webroot, since that way customers won't see the URL change to add /store/ after what they typed when there's nothing else there besides the store.

25 Jul 2010, 9:26 PM
#13
scott_see avatar

scott_see

New Zenner

Join Date:
Apr 2005
Location:
White Salmon, WA
Posts:
60
Plugin Contributions:
0

Re: Changing /index.php to point to /store/

I agree.

Thanks for all your help.

I'll have to download my backup late tonight when Hughes.net let's me download as much as I want. I have a ~300mb quota during the day. And the satellite latency issues, (pauses between each and every request to the server) make for very slow downloading when there are lots of pieces.

Thanks again. Enjoy the rest of the weekend, what little is left.

25 Jul 2010, 10:10 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing /index.php to point to /store/

If there are no files outside your /store/ folder, you could probably drag-and-drop them all up to the folder above, meaning there's no actual download/upload required for most of it.