Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to redirect Home Page

How to redirect Home Page

Locked

Views: 2,617

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
30 Jan 2007, 10:32 AM
#1
gg66 avatar

gg66

New Zenner

Join Date:
Jul 2006
Posts:
25
Plugin Contributions:
0

How to redirect Home Page

Hi,

My shop is set up in a folder called catalog. I want my domain name to go direct to this url.

For example my domain is https://www.mysite.com

My shop is at https://www.mysite.com/catalog

How do I ensure when someone types my domain name into a browser they go straight to my catalog.

Is it a .htaccess redirect file or is there a setting within zen cart to do this?

Thanks in advance,

30 Jan 2007, 11:06 AM
#2
shackle avatar

shackle

Zen Follower

Join Date:
Apr 2006
Posts:
228
Plugin Contributions:
0

Re: How to redirect Home Page

make a index.html file in the root of you server add this code to it. Remember to replace the URL part of course :-)

<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">

The above HTML redirect code will redirect your visitors to another web page instantly. The content="0; may be changed to the number of seconds you want the browser to wait before redirecting.

30 Jan 2007, 11:23 AM
#3
gg66 avatar

gg66

New Zenner

Join Date:
Jul 2006
Posts:
25
Plugin Contributions:
0

Re: How to redirect Home Page

Thanks for the reply,

However a meta refresh will not please search engines. They will assume you are spamming them, i.e. getting indexed for a page of content and then redirecting them to an unrelated page

What I've done for now is create a 301 redirect in a .htaccess file on the root of the site, see here for more info:

http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

30 Jan 2007, 2:27 PM
#4
afo avatar

afo

Totally Zenned

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

Re: How to redirect Home Page

If you want your domain name to point directly to your ZC shop, why don't you move it to the root directory?

31 Jan 2007, 6:03 PM
#5
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: How to redirect Home Page

I have the same issue...

How hard is it to move my installation from the folder called 'zen' which is under my root folder (public_html) to the root folder?

31 Jan 2007, 6:09 PM
#7
afo avatar

afo

Totally Zenned

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

Re: How to redirect Home Page

It shouldn't be that difficult. You need to move everything "as is" from the /zen/ folder to the root directory, so that the folders within /zen/ maintain their contents. You'll have to edit the config files in the admin and in the /includes/ folder to point to the root instead of the /zen/ folder. Of coure, just thinking about it makes me twitchy :shocking: , but I think that should be it. When I moved the Holzheimer's site from the test directory on another domain to the live site, that's what I had to do.

31 Jan 2007, 6:22 PM
#9
afo avatar

afo

Totally Zenned

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

Re: How to redirect Home Page

Why are you keeping your old home page if you aren't going to use it? Why don't you just replace it with the ZC files and eliminate the need for a redirect?

31 Jan 2007, 6:39 PM
#10
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: How to redirect Home Page

Well I just don't want to have to go through moving all the files over since I have everything working the way I want now.

The issue is two fold:

(A) I should have installed ZC in the root directory! I didn't and now I will have to go and do the move manually

and

(B) I wanted to be able to show the product listing for a particular category on my main "store" page. I did a lot of searching and people said it couldn't be done or it was a bad hack. What I did is just make the category product listing page look the way I wanted it to and then I added a variable called 'showHome' and when it is passed in the link it tells that template to show homepage text before the category product listing!

So that makes it look how I want, but now I need to tell ZC to go to that page directly instead of loading it's main page. Anyone know how I would do that?

PS: Thanks for all the quick replies and help everyone!