Quick 301 re-writes?

Toni Anicic

Free Member
  • Jan 19, 2009
    453
    118
    agency418.com
    Use this code into htaccess file

    Code:
    RewriteEngine On
    RewriteRule ^(.*)$ http://www.yourdomain.com$1 [R=301,L]

    I don't see how this would help OP.

    How are you entering redirects for those old product pages? Through Magento's built in URL rewrite manager?

    If there's no URL pattern that you could write a rewrite for and automatically rewrite all 300 (for exampel if all is needed is to drop some category path or rewrite the last few letters etc to get the new URL), there's no other way but enter each one manually.
     
    Upvote 0

    Toni Anicic

    Free Member
  • Jan 19, 2009
    453
    118
    agency418.com
    Well... when you were migrating data from old platform to new one, if there is old URL path saved somewhere in product data or can be reproduced from product data a php developer could write you a script that will redirect all of those. But you only have 300 so I doubt that would be a cost effective investment. maybe if you had thousands of products to redirect.
     
    Upvote 0

    Marek Skoczylas

    Free Member
    Jan 4, 2016
    235
    92
    I don't see how this would help OP.

    How are you entering redirects for those old product pages? Through Magento's built in URL rewrite manager?

    If there's no URL pattern that you could write a rewrite for and automatically rewrite all 300 (for exampel if all is needed is to drop some category path or rewrite the last few letters etc to get the new URL), there's no other way but enter each one manually.

    My mistake, I thought URLs stay the same pattern.
     
    Upvote 0

    Toni Anicic

    Free Member
  • Jan 19, 2009
    453
    118
    agency418.com
    That's always a tricky decision. Let's say, it's not bad to have 404 errors if you'll no longer stock those products. it's completely natural.

    If however there's a good alternative, I'd redirect those, but only if a product is similar enough.

    Lets say you've been selling 2GB USB sticks of brand XYZ. They stopped producing 2GB sticks and now 8GB is the smallest one they can offer you. I'd redirect that 2GB to the 8GB page, especially if there are external links towards that page.

    If you don't have a similar enough item, I'd leave it 404.
     
    • Like
    Reactions: Clodbuster
    Upvote 0
    C

    Crystal Web Designs

    Hi Clodbuster,

    Generally setting up redirections from old pages to new pages (when coming from another system and then over to Magento) can be easiest to perform with a small PHP script.

    We would generally create a connection to the old database and grab out all the urls, then find the appropriate matching Magento url and then create the redirection in the htaccess file as per what Tony Anicic says.

    This whole process can be completely automated but does require some programming.
     
    Upvote 0

    Latest Articles

    Join UK Business Forums for free business advice