Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Rewrite Search Engine-Safe URL back to normal


K3D

Recommended Posts

Posted

Hi,

 

When I originally set up my store I decided to use the in-built Search Engine-Safe URL feature. I now need to switch this feature off, but need a solution in order to maintain page rank for my product and category pages.

 

I have spent quite a few hours trying various rewrite rules and conditions but have not achieved anything, not even on a per URL basis.

 

So does anyone with a lot more .htaccess knowledge than myself know how to convert hxxp://www.mysite.com/product_info.php/products_id/35 to hxxp://www.mysite.com/product_info.php?products_id=35.

 

I would be delighted if anyone had any suggestions.

 

Kev.

Posted

Right, I have been fiddling on my local site and I put this in my .htaccess and it seems to be doing the job now:

 

RewriteRule product_info.php/products_id/28 product_info.php\?products_id=28 [R=301,L]

 

I could not find a way to carry across the /products_id/28 as a variable, so is this a safe way of doing things bearing in mind I will need about 20 of these?

Posted

There are several contributions already written to do this, have you given them a shot?

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Posted
There are several contributions already written to do this, have you given them a shot?

 

I just looked and couldn't find anything - there are many alternative SEF and SEO urls, but I don't suppose there are many people that have run the inbuilt SEF url feature for as long as my store and then want to switch back to the normal non SEO/SEF links.

 

I managed to sort it out in the end so that I only needed one rule:

RewriteRule product_info.php/products_id/(.*) product_info.php\?products_id=$1 [R=301,L]

 

Quite simple in the end really, I feel like kicking myself as it has taken so long to figure out.

Archived

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

×
×
  • Create New...