Zen Cart Logo
Forums / General Questions / Index page of site...

Index page of site...

Locked

Views: 874

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
23 Dec 2008, 6:40 PM
#1
magicman avatar

magicman

Zen Follower

Join Date:
Oct 2007
Location:
MA, USA
Posts:
385
Plugin Contributions:
0

Index page of site...

When I installed ZenCart I installed it in its own directory, ie: store.

I did this because I originally thought that I would do something with the index page and keep it separate from my shop. Well, I have not gotten around to this.

The problem with doing this is that I cannot get my index page to be in sync with the store/Zen index page. everytime I make a change, I have to save the page and load it onto the server ti the root of my site.

How difficult is it to just remove the store directory and have the shopping cart load as the main index page? Or, how can I get the main site index page to duplicate the store index page. Hopw this is not too confusing.

23 Dec 2008, 7:03 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Index page of site...

Easy.

Just copy all the Zencart folders and files to the root of your site, and edit the path information in the two configure.php files, removing the /store.

23 Dec 2008, 7:06 PM
#3
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,615
Plugin Contributions:
0

Re: Index page of site...

Note : you will need do do 301 redirects from all of the links that have been spidered to the new locations ...

23 Dec 2008, 7:29 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Index page of site...

It's pretty simple to move your Zen Cart to the root - see I have installed Zen Cart to a directory. How do I rename or move that directory? in the tutorials.

If you have a decent amount of search engine visibility built up, you will want to redirect traffic from the subfolder to the root location. One way to do this is detailed in Forwarding from old shop to new?

23 Dec 2008, 8:31 PM
#5
magicman avatar

magicman

Zen Follower

Join Date:
Oct 2007
Location:
MA, USA
Posts:
385
Plugin Contributions:
0

Re: Index page of site...

Thanks for the quick response guys. The 301 redirects is what scares me. I have never done one and am pretty much lost for knowing how to.

Is there any benefit to running the Cart from the root vs a sub dir? Is there an easy way to have the root index page mirror the Sub Dir cart index page? Thanks

23 Dec 2008, 8:38 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Index page of site...

I had never done that either, but with guidance from experts I was able to work out exactly what is needed for the situation. See post 22 in that thread.

23 Dec 2008, 9:21 PM
#7
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Index page of site...

Depending on what you want here are two suggestions.

Example 1
Is very simple if your site is called with just it's url this
will send it to your sub directory.
Copy this text and save as index.html and place it in the root of your url.
(1)

<html>
<body onload=location.replace('http://www.yoursite.com/store/index.php')>
</body>
</html>

Example 2
Is a rewrite mod that you would need to be place in your root .htaccess file
This rewrite works alot different then most. It allows you to have a
sub directory with your zen cart in it but when looking at the url address in a browser
it will display the store as if you have it in the root.
(2)

Options -Indexes
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com$ [NC]
RewriteRule .* http://www.yoursite.com/ [L,R=301]
RewriteRule ^$ store/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/store%{REQUEST_URI} -f
RewriteRule .* store/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* store/index.php?q=$0 [QSA]

You will need to edit the urls of these examples to fit your needs.