How can I make the media library only serve up content for a files actual extension, and perform a 301 permanent redirect to the actual URL for any other extension. For SEO reasons.
By default the media library works for multiple extensions, e.g. ashx, doc, docx etc I can get the media library links to be generated with the right extension.
But I want search engines which have a link to an invalid extension to updated to the actual file extension. To prevent the same file being indexed multiple time on different paths.
If it was a web page could have a canonical URL, but for media library items, need to perform a permanent redirect to the actual file desired url/extension.