So the way I needed to do it

Posts: 822
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

So the way I needed to do it to get it work was like this below:

RewriteEngine on
RewriteCond %{QUERY_STRING} products_id=1234
RewriteRule ^product_info\.php$ /magazine/time? [R=301,L]
Hope that helps for folks migrating from Oscommerce to Ubercart.

I just saw this thread, after having implemented my own redirects to make sure all my old pages mapped to the new ones. My solution looks remarkably like yours. Two comments though:

1) You should really use a $ at the end of the RewriteCond, i.e. it should be

RewriteCond %{QUERY_STRING} products_id=1234$

otherwise this condition will match product ID=1234 but will also match products with ID=12345, ID=12346, ID=1234787878, etc.

2) Redirecting all products this way in the .htaccess adds a little overhead, since .htaccess is parsed for every page request. Redirecting hundreds of products slows down every page a little bit. Since 301 is a permanent redirect, I plan to closely monitor my web access logs to make sure search engines respect this and start indexing my new URLs, then I hope eventually to be able to remove the redirects entirely once requests for the old URLs have dropped off.

--

<tr>.

MagmaMags Magazine Subscriptions relaunch: Oscommerce -> Ubercart By: aswalla (15 replies) Tue, 10/02/2007 - 12:06