hi experts, i moved my website to different domain, i want to replace Old URLs to new URLs with 301 redirect using .htaccess file. i know its simple to move links, but the problem is i replace site's extension CFM to PHP these are the sites http://www.roansolutions.com = original site based on cfm http://dumbbell-i.com = new Site based on wordpress Code (markup): these are the changed site links http://www.roansolutions.com/index.cfm?event=Success-Stories to http://dumbbell-i.com/success-stories http://www.roansolutions.com/index.cfm?event=Success-Story-Details&CaseStudyID=2 to http://dumbbell-i.com/success-stories/altman-vilandrie-company-case-study http://www.roansolutions.com/index.cfm?event=Fixed-Cost-Advantage to http://dumbbell-i.com/fixed-cost-advantage and few more.. around 50 Code (markup): so i am asking for a .htaccess code, that code can redirect old link to new link. i have full list of changed urls. hope you guys understand. regards,
An example which would get you started with the setup of the .htaccess file. Options +FollowSymlinks RewriteEngine on RewriteRule ^index.cfm?event=([a-z]+)-([a-z]+) http://dumbbell-i.com/$1-$2 [NC] Here the regular expression stuff is kicking in, this is powerful but you have to be careful and lookup how this must be done correctly. The index.cfm?event=Success-Stories to /success-stories will pick this up, but when using the ID=2 you must create a different one with custom REGEXP.