Hi, I had a page, team-info.php?team_id=48 for example and some of these pages have been indexed by google, I then decided to move team-info.php into a folder named team and use my .htaccess file to rewrite the links to team/48 meaning some of the results in google now link to an error page. I have tried to direct the old links to the new links but it doesn't seem to be working, here's my code:
Rewrite rule that currently works to point dynamic link to a clean URL:
RewriteRule ^team/([0-9]+)$ team/team-info.php?team_id=$1
Rewrite rule to move the old dynamic link to the new one, that is not currently working:
RewriteRule ^team-info.php?team_id=([0-9]+)$ team/$1 [R=301,L]
If anyone can help me on this then I would be very grateful, i've been trying different solutions out for a while now and not getting anywhere, thanks.