needs to be redirected to this URL
Here is another example:
The client wants the page id removed from the URL. Can this redirect be done in the htaccess file or do I need to do it using PHP?
Yes, it can be done using a
Place this rule in your site root .htaccess:
RedirectMatch 301 ^/(articles)/\d+-(.+)$ /$1/$2