I have general knowledge of htaccess. I can rewrite old urls to new...etc. I rebuilt the site and have new URLs with slug etc.. something i did not have before. I have about 4000 urls indexed by search engines.
These current URLs are like so:
exmaple.com/records.php?id=44
My new site URLs are like so:
exmaple.com/record-44-name-of-record
I can redirect each one individually with success with the following code in htaccess:
RewriteCond %{QUERY_STRING} id=44
RewriteRule ^records\.php /record-44-name-of-record? [R=301]
"name-of-record" is from MYSQL DB that i slug in the PHP script.
While the above works perfect. I don't want to manually write 4000 urls in my htaccess. I've tried many different ways based off of what i search here and google without luck.
Thanks for the help. I know that this may have been asked a lot here and I've tried many different ways w/o success.