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));
}
?>
Bookmarks