Forums / Templates, Stylesheets, Page Layout / How do I make my Zen Cart my index file?

How do I make my Zen Cart my index file?

Locked

Started by eddie_french on 8 Nov 2009, 6:57 PM · Views: 3,009

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
8 Nov 2009, 6:57 PM
#1
eddie_french avatar

eddie_french

New Zenner

Join Date:
Nov 2009
Posts:
18
Plugin Contributions:
0

How do I make my Zen Cart my index file?

On my server there is a folder public html where I would put a index so the page is my homepage. When Zen Cart is in a folder named catalog how do I make it to my index?

If I have another index file I can see my cart by index/catalog but how do I get my cart to come up under my domain name.

Thanks
Eddie

8 Nov 2009, 8:45 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How do I make my Zen Cart my index file?

There are a few ways.

The best in my opinion is to move the Zen Cart installation into the root. This is a bit of a pain in that you need to alter configure files etc to match the move. I think there is tutorial for this but search the forum because it has been explained before.

The other way is to add a 301 divert that will divert traffic (permanently) for your root to the Zen Cart folder. It is done in the.htaccess file and again I think there is information in the forum on how to do this.

The disadvantage of the second option is that the URLs will remain like this:

https://www.domain.com/zencart/blahblahblah.php

So if someone types in to a browser https://www.domain.com they will get straight to the shop but the URL will be https://www.domain.com/zencart/index.php

Nick
iszent.com

9 Nov 2009, 3:38 AM
#3
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: How do I make my Zen Cart my index file?

The best thing to do is move Zen Cart to the root (public_html). The steps are outlined in

https://www.zen-cart.com/tutorials/index.php?article=122

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

9 Nov 2009, 3:44 AM
#4
tino_schlegel avatar

tino_schlegel

Totally Zenned

Join Date:
Nov 2007
Location:
Melbourne, Australia
Posts:
532
Plugin Contributions:
0

Re: How do I make my Zen Cart my index file?

If you dont have anything else in the root folder, there is no reason why to put zencart not there. However, if you wanna leave ti there for the moment, you can create a index.php file in the root (public_html) directory with the following content

<?php
header ("location: /catalog/index.php");
die;
?>
9 Nov 2009, 4:47 AM
#5
holligoly avatar

holligoly

New Zenner

Join Date:
Sep 2009
Posts:
5
Plugin Contributions:
0

Re: How do I make my Zen Cart my index file?

I had the same question and I did tino's fix...But of course it did not work. My zencart was under /store. :P

My question is this. Will this affect my analytics? Does anyone know?
Thanks!

Holligoly
My favorite page... https://www.thecoolershade.com

9 Nov 2009, 8:26 AM
#6
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How do I make my Zen Cart my index file?

OK. I agree with everything that people (including myself) have said. It is preferable to move the install into the root folder. If for some reason you can't or don't want to I still think that the best way to do it (both for functionality and for search engines) is to use a 301 redirect in an htaccess file.

The .htaccess file sits in the root directory and needs to contain this line:

redirect 301 /index.php http://www.domain.com/shop/

where https://www.domain.com/shop is the path to the shop.

What exactly do you mean about effecting analytics? With the 301 the pages are reported in analytics by their actual paths . For instance, the home page is reported as https://www.domain.com/shop.

If you are asking about SEO stuff then the 301 is the best way of doing a redirect. It is a permanent redirect and search engines treat https://www.domain.com as if it was https://www.domain.com/shop/

Still, however, my recommendation is to move the install into the root folder.:smile:

Nick
iszent.com

11 Nov 2009, 6:17 AM
#7
holligoly avatar

holligoly

New Zenner

Join Date:
Sep 2009
Posts:
5
Plugin Contributions:
0

Re: How do I make my Zen Cart my index file?

Hey thanks... I will try that. I am very concerned about SEO. My page https://www.thecoolershade.com has not been indexed since Sept 13th and I don't know why...I just started but I think it should have been indexed by now as far as SEO goes...

Holligoly
My favorite page... https://www.thecoolershade.com

27 Dec 2009, 5:17 PM
#8
yarndog avatar

yarndog

New Zenner

Join Date:
Dec 2009
Posts:
2
Plugin Contributions:
0

Re: How do I make my Zen Cart my index file?

For what it is worth I left all of my file structure intact and asked my webhost to do the redirect 301 as what I was doing via cpanel wasn't working. What they ended up doing is making my /zencart folder my home directory for purposes of my website pointer, meaning https://www.yarndogpress.com, when a user types that in the browser, points directly to https://www.yarndogpress.com/zencart, it works fine and I had to go in to the different configuration files and get rid of references to /zencart, and then I downloaded fix_cache_key.php and ran the test and everything works fine. I left my database cache folder as /zencart, in its original location as I didn't move any /zencart files only the pointer was changed via my webhost. Well, don't know if I added anything useful or added to the confusion, but that is my story and I am happy to say it is working out A OK!