Changing carts, want to use rewrite to keep things working

Discuss practical ways rearrange URLs using mod_rewrite.

Changing carts, want to use rewrite to keep things working

Postby Kronos9326 » Thu Mar 12, 2009 6:46 pm

We're switching shopping cart systems, and we'd like to be able to keep as many of our search engine rankings as possible.

We'd like to take a URL like /product/playing+cards/card+magic+books/art+of+astonishment+by+paul+harris.do and have it foward to something like /art-of-astonishment-by-paul-harris

I wouldn't know where to start. Is this even possible or do I need to write a script to do what I'm trying to accomplish.

David.
Kronos9326
 
Posts: 1
Joined: Wed Mar 11, 2009 6:55 am

Postby richardk » Fri Mar 13, 2009 5:24 am

Redirecting /product/playing+cards/card+magic+books/art+of+astonishment+by+paul+harris.do to /art+of+astonishment+by+paul+harris is easy
Code: Select all
RedirectMatch 301 ^/product/.+/([^/]+)\.do$ http://www.example.com/$1


Replacing the +s with -s is easier to do with a script.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 20 guests

cron