Msg#: 4673975 posted 4:31 pm on May 23, 2014 (gmt 0)
Hello unclej, your question makes me ask if these are backlinks or hotlinks that you want to redirect? It is a media file, not a page.
Before you get to that part, you should take a look at the rest of the htaccess rules you have in place and reverse the order of those first two rules so the server doesn't need to loop twice for one request. That rule in #1 position doesn't look quite right.
Msg#: 4673975 posted 7:20 pm on May 23, 2014 (gmt 0)
A hotlink is you hosting a resource (like an image or an MP3) that is used as a resource on another site. I am not sure that hotlinked resources carry any link juice, it does not seem that they could since they are not standalone pages that get a slot in the serps. The links were not backlinks beneficial to your site, it was other sites running up your bandwidth usage. If you have removed the file you should return a 404. A 301 redirect tells search engines that what used to be "here" is now over "there" and that isn't what they'll find. Google considers that a soft 404, not a good thing. 404s are natural and normal, soft 404s aren't.
Msg#: 4673975 posted 7:30 pm on May 23, 2014 (gmt 0)
Is this code valid:
NEVER combine mod_rewrite and mod_alias in the same htaccess. All the mod_alias rules (Redirect by that name) will execute after the RewriteRules, here meaning after your domain-name and index.html redirects-- which, incidentally, are in the wrong order. Hostname is the very last redirect; index.html is typically the second-to-last.
not sure what a hotlink is...but a lot of websites directly linked to the mp3.
I'm not sure the term "hotlink" applies to an mp3, unless other people's sites are coded to start playing your sounds automatically. We're talking about music files, right?
Mass redirects of nonexistent files to the home page are almost never appropriate. Who cares what the home page is? They wanted music. You can choose to serve a 410, or let it default to 404. Either way, make a nice custom 404/410 page to let your users know what's up.