Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm moving my site and the URL structure has changed because of the new CMS. The urls would be similar to /my.products.htm on the new site we are changing the URLs to this /my-products is their a way to redirect all of the products to this new URL scheme using Mod_rewrite 301 redirect? Or is their another method I could use? The old site ran PHP the new one runs on Netsuite if that helps.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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]
share|improve this answer
    
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
    
You're Welcome. –  Emmanuel Mar 25 '11 at 4:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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