Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can I 301 search engine friendly URLs?


smartwork

Recommended Posts

Posted

We're upgrading/updating an old OSC shop to a new version that will include SEO URLs. Can we 301 our former search engine friendly URLs? I've tried researching the syntax, but haven't discovered anything that I found directly matched how the search-friendly URLs are structured.

Posted

We're upgrading/updating an old OSC shop to a new version that will include SEO URLs. Can we 301 our former search engine friendly URLs? I've tried researching the syntax, but haven't discovered anything that I found directly matched how the search-friendly URLs are structured.

 

If you have php 5.2+ you can install ultimate seo urls 5 osC search engine safe urls are correctly 301 redirected.

 

Also you are getting a whole lot more ( also the pro version in development for release at or near xmas )

Posted

Thanks, Robert. I believe we worked with that trying to get it worked out in our old MS2.1 shop which has many contributions installed over the years. We couldn't quite get it all hammered out, and after reviewing other features that we wanted to update, we are jumping up to a newer version of OSC to serve as our new base from which to work. Weighing all the options included, OSCMax seemed to give us the best launching point for our needs - although we've had to bring that up to speed with mods we had in our shop. So, we were hoping to .htaccess to the new URLs if possible.

Posted

So, we were hoping to .htaccess to the new URLs if possible.

 

Which new urls?

 

I'm not clear on what format were the old urls and what format are to be the new?

Posted

Here are examples of the transition we're makingin URL format, and also eliminating the "catalog" directory

 

  
Current Search Friendly URL formats

Main category example
http://www.domain.com/catalog/default.php/category/Category%2BName/cPath/10

Subcategory example
http://www.domain.com/catalog/default.php/category/Category%2BName/cPath/10_22

Product example
http://www.domain.com/catalog/product_info.php/products_id/3442



New URL formats

Category example
http://www.domain.com/category-name-c-10.html

Subcategory example
http://www.domain.com/category-name-c-10-22.html

Product example
http://www.domain.com/product-name-p-3442.html

Posted

Here are examples of the transition we're makingin URL format, and also eliminating the "catalog" directory

 

  
Current Search Friendly URL formats

Main category example
http://www.domain.com/catalog/default.php/category/Category%2BName/cPath/10

Subcategory example
http://www.domain.com/catalog/default.php/category/Category%2BName/cPath/10_22

Product example
http://www.domain.com/catalog/product_info.php/products_id/3442



New URL formats

Category example
http://www.domain.com/category-name-c-10.html

Subcategory example
http://www.domain.com/category-name-c-10-22.html

Product example
http://www.domain.com/product-name-p-3442.html

 

These don't help as they seem to be from RewriteRules as opposed to real uris ..

http://www.domain.com/catalog/default.php/category/Category%2BName/cPath/10

Posted

That's the format generated by the OSC search engine friendly URLs turned on and it's the format that we have indexed for many URLs in Google.

 

Here is the category format with the Search-Friendly turned off:

 

http://www.domain.com/catalog/default.php?category=Category%2B%26%2BName&cPath=10

Posted

If I wanted to manully write the redirects - at least for my categories, I was thinking something like this which would reverse the search-engine friendly format into the original format and then redirect:

 

RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/(121)$ default.php?category=$4&cPath=121

RewriteCond %{QUERY_STRING} ^category=Category%2BName&cPath=121$

RewriteRule ^default\.php$ http://www.domain.com/newurl.htm [R=301,L]

 

The intent was to take

http://www.domain.com/catalog/default.php/category/Category%2BName/cPath/121

 

and make it into

http://www.domain.com/catalog/default.php?category=Category%2BName&cPath=121

 

and then redirect it (line 2 and 3 work, but not line 1 to 2)

 

121 was simply used as an example of the category's ID being redirected.

Archived

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

×
×
  • Create New...