Forum Moderators: phranque

Message Too Old, No Replies

Redirect mp3 to html, not working.

with User Agent: Real Player

         

attilako

10:02 am on Nov 15, 2006 (gmt 0)

10+ Year Member



I am a musician-songwriter and get many hits to my MP3 files on my server.

I have used this redirection script in .htaccess, to redirect them to a html:

RedirectMatch ^(.+)\celebrity.mp3$ http://www.example.com/index.html

It works fine, so long users arrive at the script from a web browser. But unfortunately most of my visitors come with a Real Player or Windows Media Player.Agent, .. and these players can not understand the redirection script.

Maybe the solution woud be a Rewrite engine script?
But I'm just a musician so I would greatly appreciate your help in this case.

Greetings from Denmark
Attila Kovacs

[edited by: jdMorgan at 2:58 pm (utc) on Nov. 15, 2006]
[edit reason] No sigs or URLs please. [/edit]

jdMorgan

6:03 pm on Nov 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Media players differ from Web browsers in two important ways:

First, media players handle only "media files" such as MP3 and AVI, while browsers handle HTML, still images, JavaScript, and very little else -- using plug-ins to handle media files.

Second media players typically do not provide an HTTP Referer header, so you cannot tell if they clicked a link on your site or some other site in order to reach your media.

The first difference makes it difficult or even impossible to forcibly change media types -- like redirecting an <embed src="doremi.mp3">-tagged embedded media file to an HTML file which would normally be linked as <a href="doremi.html">.

The second difference makes it difficult to implement access control by referrer for media files, requiring more complex cookies-and-script solutions.

The bottom line is that for maximum client compatibility, you should not attempt to redirect or rewrite URLs of one MIME-type to those of a different MIME-type.

Jim

attilako

11:14 pm on Nov 16, 2006 (gmt 0)

10+ Year Member



Thank for your opinion, Jim.

Attila