Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Location
    Newport, Wales
    Posts
    283
    Plugin Contributions
    0

    Default 301 redirect for products in moved categories

    Hi

    I have just upgraded my zencart sites and in the process I decided to move some high level categories down a level in effect making them sub-categories.

    I have heard of 301 redirection however I am not sure if a Category level redirect also works for products within that category. For example do I have to assign redirects to each category as well as each individual product? Or will a category redirect cover both.

    Also when looking though the threads on 301 redirect I came across a post by Dr Byte which seems to imply that the /includes/init_includes/init_category_path.php file can be used as detailed below. (I personally prefer this menthod than using the HTaccess but just need to understand the pros and cons.

    So if anyone can provide any assitance or advice it would be appreciated.

    Cheers
    Brinley

    Code:
    $this_is_home_page = ($current_page=='index' && (!isset($_GET['cPath'])) && (!isset($_GET['manufacturers_id'])) && (!isset($_GET['typefilter'])) );
    
    // redirect certain categories to others, instead of the usual approach of cross-linking products to alternate categories via the admin
    $newPath = '';
    if ($cPath == '3_12') $newPath = '54_60';
    if ($cPath == '22') $newPath = '2_19';
    
    if ($newPath != '') {
      header("HTTP/1.1 301 Moved Permanently");
      zen_redirect(zen_href_link(FILENAME_DEFAULT, 'cPath=' . $newPath));
    }
    ?>

  2. #2
    Join Date
    Oct 2013
    Location
    120 Wilshire Blvd,Brentwood,NY,11717
    Posts
    94
    Plugin Contributions
    0

    Default Re: 301 redirect for products in moved categories

    you can do 301 on Cpanel , that super easy

    I do suggest you redirect to the domain without (www)

    faster to ranking

  3. #3
    Join Date
    Aug 2004
    Location
    Newport, Wales
    Posts
    283
    Plugin Contributions
    0

    Default Re: 301 redirect for products in moved categories

    Okay I figured I would leave a note on what I discovered regarding 301 redirects just in case it is of benefit to someone else.

    Originally I figured I needed to add 301 redirects to the products and categories I had moved into sub categories based on the assumption that google would not be able to find the moved products leading to broken links. During the research process I also read an article saying that it was necessary to have 301 redirects for non www links as Google could deem a www & non www site duplicate content.

    The resulting changes I have made to my sites based on the above issues has been..............zero.

    And here's my reasoning:
    If I typed in a non www url for my site the only page that would appear as such is the first page and after that, because the config files on my sites specify www, all subsequent pages contain the www.
    With regards to the moved products and categories I did a test found one of my products on google and clicked the link to the old url and found it went to the new url. The reason for this is that the moved product retained the canonical link which meant the product was found .
    Finally I should mention that I did play with 301 redirects and found getting them to work was quite fiddly as some of them caused problems with ssl as the overode the redirect that ssl requires. Eventually I did get it to work but decided based on the above reasoning I figured it was not needed.
    Finally I did have a few people mention that non www sites are liked better by Google but every time I asked for more details nothing of substance was forthcoming.

    Anyway that it - happy to hear any thoughts anyone might have.

    Cheers
    Brinley

 

 

Similar Threads

  1. v150 Move categories and 301 redirect cpath
    By Shop Suey in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 8 Feb 2016, 12:22 PM
  2. v139h Create 301 redirect for an EZ Page
    By jeking in forum General Questions
    Replies: 4
    Last Post: 11 Mar 2014, 02:08 PM
  3. How to redirect a pseudo-static page using a 301 redirect ?
    By anahong in forum General Questions
    Replies: 1
    Last Post: 23 Jul 2010, 02:37 PM
  4. Replies: 14
    Last Post: 2 Jul 2008, 03:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR