Canonical Url .htaccess Redirects After Disabling A Product

Please LogIn to Reply!

Post By: admin | 26-01-2012 06:35 Reply


Hey all, I would like to share something with you that deals with redirecting all disabled products to their respective category landing page of where that product was in.

This is helpful so you do not lose out on any link juice from other sites linking to this NOW disabled product.  Your link juice will flow to its respected category page now and google will not pick up on these pages as 404.

the code goes in your .htaccess file and it is:

RewriteRule ^(.*)/url_key(.*)$$1$2  [L]

where url_key is… yep you guessed it,
the products url_key (without the .html extension)

I would like for this to automatically be written into .htaccess / magento rewrite rules after I disable a product though.

Is this possible?


modern furniture

`Reply Or Comment!
Please LogIn to Reply!