Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Basic Configuration / Changing /index.php to point to /store/

Changing /index.php to point to /store/

Locked

Started by scott_see on 25 Jul 2010, 5:03 PM · Views: 2,146

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

Post #1 by scott_see

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,

Scott See
www.hammock.net
Global Marketing
White Salmon, WA

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

drbyte

Sensei

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

Post #2 by drbyte

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?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

Post #3 by scott_see

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?

Scott See
www.hammock.net
Global Marketing
White Salmon, WA

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

drbyte

Sensei

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

Post #4 by drbyte

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?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

Post #5 by scott_see

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?

Scott See
www.hammock.net
Global Marketing
White Salmon, WA

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

drbyte

Sensei

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

Post #6 by drbyte

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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

Post #7 by scott_see

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.

Scott See
www.hammock.net
Global Marketing
White Salmon, WA

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

drbyte

Sensei

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

Post #8 by drbyte

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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

Post #9 by scott_see

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,

Scott See
www.hammock.net
Global Marketing
White Salmon, WA

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

drbyte

Sensei

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

Post #10 by drbyte

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 /

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

Post #11 by scott_see

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.

Scott See
www.hammock.net
Global Marketing
White Salmon, WA

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

drbyte

Sensei

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

Post #12 by drbyte

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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

Post #13 by scott_see

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.

Scott See
www.hammock.net
Global Marketing
White Salmon, WA

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

drbyte

Sensei

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

Post #14 by drbyte

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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.