Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Using mod_rewrite to migrate to OSCommerce


a1200

Recommended Posts

Posted

I have this online store that is doing considerable business, that I want to move to osCommerce, however in the time it takes for the search engines to update all their links, the store could have lost considerable revenue. The site has Ultimate SEO URLS installed and I am hoping that either that, or apache .htaccess alone (or maybe you have another idea) can read a request from the old URL structure and translate it to osComerce.

 

What I have is:

 

Original:

http://www.site.com/pageview.php?page=show_product&ecommerce_stockcode=THISISATEST

 

osCommerce as it is now (can be changed if needed)

http://www.site.com/this-test-p-30.html

(sometimes shows the oscid i.e. http://www.site.com/this-test-p-30.html?oscsid=20e8d8be44c99ead34184cbaaf0f1d66)

 

Trouble is, the ultimate SEO URLs translates its name by title, but I wonder if there is a way to redirect to the appropriate stock code somehow.

 

Anyone got any good ideas?

 

 

Cheers!

Posted

I have this online store that is doing considerable business, that I want to move to osCommerce, however in the time it takes for the search engines to update all their links, the store could have lost considerable revenue. The site has Ultimate SEO URLS installed and I am hoping that either that, or apache .htaccess alone (or maybe you have another idea) can read a request from the old URL structure and translate it to osComerce.

 

What I have is:

 

Original:

http://www.site.com/pageview.php?page=show_product&ecommerce_stockcode=THISISATEST

 

osCommerce as it is now (can be changed if needed)

http://www.site.com/this-test-p-30.html

(sometimes shows the oscid i.e. http://www.site.com/this-test-p-30.html?oscsid=20e8d8be44c99ead34184cbaaf0f1d66)

 

Trouble is, the ultimate SEO URLs translates its name by title, but I wonder if there is a way to redirect to the appropriate stock code somehow.

 

Anyone got any good ideas?

 

 

Cheers!

 

Depends how the stock code relates to the osCommerce database.

 

If "stock code" === model in the oscommerce database then it would be easy.

 

Basically it can only be done if there is correltation between the old URI and what we can compare it to in the new osC database.

Posted

Depends how the stock code relates to the osCommerce database.

 

If "stock code" === model in the oscommerce database then it would be easy.

 

Basically it can only be done if there is correltation between the old URI and what we can compare it to in the new osC database.

I am planning on importing stock from the other site so stock/product code will be the unique identifier. Suggestions would be welcome.

Posted

I am planning on importing stock from the other site so stock/product code will be the unique identifier. Suggestions would be welcome.

 

Yes .. but what I'm saying is ..

 

http://www.site.com/pageview.php?page=show_product&ecommerce_stockcode=THISISATEST

 

THISISATEST is the unique identifier ( is it unique and unique to every single product? )

 

Where will this unique code go in the osCommerce database?

Posted

Yes .. but what I'm saying is ..

 

http://www.site.com/pageview.php?page=show_product&ecommerce_stockcode=THISISATEST

 

THISISATEST is the unique identifier ( is it unique and unique to every single product? )

 

Where will this unique code go in the osCommerce database?

Sorry Robert, I see what you mean, well it would be what osCommerce defines as the "Products Model". If this can be assigned from Ulti SEO URLS - whilst I am at it I am guessing I should change to your version (v5)?

Posted

Just to clairify, the products model (which was the identifier on the old shop) will be a unique field.

Posted

Just to clairify, the products model (which was the identifier on the old shop) will be a unique field.

 

Should be relatively clear then.

 

1) Import all products into osCommerce ensuring the products_model remains unique to each product.

 

2) Export the model and product id as key value pairs into an array that is saved to the server.

 

3) Create a PHP file in the root directory which includes the array created above and a .htaccess RewriteRule that will direct to this file when the old product url is matched.

 

4) use array_key_exists() to match the old identifier to the new products id and 301 redirect as required.

Posted

Should be relatively clear then.

 

1) Import all products into osCommerce ensuring the products_model remains unique to each product.

 

2) Export the model and product id as key value pairs into an array that is saved to the server.

 

3) Create a PHP file in the root directory which includes the array created above and a .htaccess RewriteRule that will direct to this file when the old product url is matched.

 

4) use array_key_exists() to match the old identifier to the new products id and 301 redirect as required.

 

Thanks Robert, I'll give it a go!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...