I have a URL
original: https://www.example.com/video/12345/name-of-the-video/
Sometimes users or web crawlers write the URL differently:
https://www.example.com/video/12345/name-of-the-video/65485/
https://www.example.com/video/12345/
https://www.example.com/12345/
I want all 3 URLs to redirect (forward) to the original:
https://www.example.com/video/12345/name-of-the-video/
My current htaccess rule is:
RewriteRule ^video/([0-9]+)/([^/]+)/$ view_video.php?id=$1&dir=$2 [L,QSA]
RewriteRule ^video/([0-9]+)/$ view_video.php?id=$1&dir=fake [L,QSA]