2

I'm moving my site and the URL structure has changed because of the new CMS. The old URLs are similar to /my.products.htm, but on the new site we are changing the URLs to /my-products.

Is there a way to redirect all the products to this new URL scheme using a mod_rewrite 301 redirect? Or is there another method I could use? The old site ran PHP the new one runs on Netsuite if that helps.

2

Add this to the .htaccess file in your root directory

RewriteRule ^([A-Za-z0-9]+)\.([A-Za-z0-9]+)\.htm$ http://www.example.com/$1-$2 [R=301]
  • Thank you so much! It works perfectly! Google had been indexing the old IP because of some DNS changes we have no control of until the end of April. This corrects those URLs to point in the right direction. Thanks again! – Nick Mar 24 '11 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.