Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / How to Redirect a Main Category to a Sub Category?

How to Redirect a Main Category to a Sub Category?

Views: 1,322

Results 1 to 7 of 7
14 Nov 2012, 6:52 AM
#1
jackdeth avatar

jackdeth

New Zenner

Join Date:
Aug 2012
Posts:
14
Plugin Contributions:
0

How to Redirect a Main Category to a Sub Category?

I am trying to up my categories so that when someone clicks on the Main Category they are sent to a Subcategory under the Main.

For Example when someone clicks on the Main Category 'Ear Cuffs'
http://siamsterling.worthowning.com/index.php?main_page=index&cPath=1

I want them to end up in the Sub Category 'Plain Silver'
http://siamsterling.worthowning.com/index.php?main_page=index&cPath=1_15

I would like to know the Best way to accomplish this as well as the easiest if they are different.

Thank you for taking the time to read this.

14 Nov 2012, 1:26 PM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: How to Redirect a Main Category to a Sub Category?

What you need is this:
http://www.zen-cart.com/downloads.php?do=file&id=889

Don't tell anyone I told you about it though. I'll never hear the end of it. :)

Cheers
Rod

14 Nov 2012, 3:17 PM
#3
stevesh avatar

stevesh

Black Belt

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

Re: How to Redirect a Main Category to a Sub Category?

Rod, Rod, Rod :no:

15 Nov 2012, 11:01 AM
#4
jackdeth avatar

jackdeth

New Zenner

Join Date:
Aug 2012
Posts:
14
Plugin Contributions:
0

Re: How to Redirect a Main Category to a Sub Category?

Rod,

Thanks for that, It was kinda of a 'big' solution to a small problem, but it worked great and it is better to get the SEO stuff on there before I add 1000s of products.

Thanks again.

RodG:

What you need is this:
http://www.zen-cart.com/downloads.php?do=file&id=889

Don't tell anyone I told you about it though. I'll never hear the end of it. :)

Cheers
Rod

15 Nov 2012, 2:44 PM
#5
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: How to Redirect a Main Category to a Sub Category?

jackdeth:

Rod,

Thanks for that, It was kinda of a 'big' solution to a small problem,

Yes, it was. There are much easier and simpler ways to do what you wanted. I was sure someone else would have mentioned at least one of them by now.

jackdeth:

but it worked great.

I figured it would.

jackdeth:

and it is better to get the SEO stuff on there before I add 1000s of products.

STOP: Attention. Alert!!!!
If you'd so much as mentioned 'SEO' in your original post we probably wouldn't be having this conversation. I'd have given a the easier solution, along with a lecture.

I'll save the lecture, but to Stevesh, and possibly others, I feel I owe a bit more of an explanation as to why I recommended a product/module/technology that many assume I have an unreasonable(?) hatred for.

My stance on URI mapping in regards to any 'SEO' benefits still hasn't changed.

The deal is, the problem presented only really has two solutions (albeit, with many methods of implementation).

Only one of these solutions are available to most end users, and that is, to utilise the redirect and/or rewrite features of the webserver by modifying the .htaccess file (the other method is via the global settings for the web server, which is only good for those with VPN's or other private server).

OK, so since the only solution to the business case presented is to modify the .htaccess file, the question then became what is the best way to modify this file.

I felt quite comfortable in suggesting the CEON mod because I knew it'd do the job (and then some) and that coner was around to help support any issues the OP may come across in implementing the solution to his specific problem.

The business case presented is the core reason why this technology was 'invented'. It was never intended to benefit search engines, but sadly, that is all they seem to be used for these days (even though the gains are debatable).

If you aren't clear of my logic/reasoning, please ask, because I'm sure I could explain myself even better. Or perhaps not.

Cheers
Rod

16 Nov 2012, 3:18 AM
#6
jackdeth avatar

jackdeth

New Zenner

Join Date:
Aug 2012
Posts:
14
Plugin Contributions:
0

Re: How to Redirect a Main Category to a Sub Category?

When I posted my original question I was not thinking about SEO at all, in fact I am far more occupied with the look and usability of my site. SEO would be something that would have to come later, after I have mastered manipulating Zencart with CSS and HTML (and with any luck PHP).

If this does give some small SEO advantage, then great. If not, that is fine too. I am happy to have the benefit of human readable URLs .

Next problem .. getting my site to look as good in IE8 and older as it does on 'modern' browsers. The fun never stops.

Thanks again.

RodG:

Yes, it was. There are much easier and simpler ways to do what you wanted. I was sure someone else would have mentioned at least one

STOP: Attention. Alert!!!!
If you'd so much as mentioned 'SEO' in your original post we probably wouldn't be having this conversation. I'd have given a the easier solution, along with a lecture.

I'll save the lecture, but to Stevesh, and possibly others, I feel I owe a bit more of an explanation as to why I recommended a product/module/technology that many assume I have an unreasonable(?) hatred for.

My stance on URI mapping in regards to any 'SEO' benefits still hasn't changed.

The deal is, the problem presented only really has two solutions (albeit, with many methods of implementation).

Only one of these solutions are available to most end users, and that is, to utilise the redirect and/or rewrite features of the webserver by modifying the .htaccess file (the other method is via the global settings for the web server, which is only good for those with VPN's or other private server).

OK, so since the only solution to the business case presented is to modify the .htaccess file, the question then became what is the best way to modify this file.

I felt quite comfortable in suggesting the CEON mod because I knew it'd do the job (and then some) and that coner was around to help support any issues the OP may come across in implementing the solution to his specific problem.

The business case presented is the core reason why this technology was 'invented'. It was never intended to benefit search engines, but sadly, that is all they seem to be used for these days (even though the gains are debatable).

If you aren't clear of my logic/reasoning, please ask, because I'm sure I could explain myself even better. Or perhaps not.

Cheers
Rod

16 Nov 2012, 1:23 PM
#7
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: How to Redirect a Main Category to a Sub Category?

jackdeth:

When I posted my original question I was not thinking about SEO at all, in fact I am far more occupied with the look and usability of my site.

As you should be.

jackdeth:

If this does give some small SEO advantage, then great. If not, that is fine too. I am happy to have the benefit of human readable URLs .

Sooner or later, most new merchants read about 'SEO' and will always try to implement it into their stores. Rightly so, we'd all like top search engine rankings, so why not?

There are many ways a site can be Optimised for Search Engines, including redirects and/or rewrites, which although at one time demonstrably useful, don't carry much weight these days.

Anyway, as per my previous posts, there are easier less 'big' solutions to solve the issue that you had, but all would in one way or another involve the creation and or editing of the .htaccess file. This in itself, no problem, BUT, if you then came across the 'SEO' module(s) you (and all others that follow this same common path) end up modifiying a pre-modified .htaccess file, unaware or any conflicts, usually even unaware which file is being edited. End result, thing don't work, links go to unexpected places, and many a good hour gets wasted...

Here endeth the lesson.

jackdeth:

Next problem .. getting my site to look as good in IE8 and older as it does on 'modern' browsers. The fun never stops.

You could spend your entire life and still never get this right... and when you do, someone will come along with a different resolution screen and a different set of browser standards, just to mess you up. :)

Cheers
Rod.

ps. Two tips for top rankings in google, etc.

  1. Content, content, content......
  2. backlinks, backlinks and backlinks.

These are the very essence of how the things work.