EX.com/file.mp3 to AMPLE.com/home.html
April 10, 2006 12:58 PM   Subscribe

Is there a way to make requests for Mp3s on EX.com redirect to an Html file on AMPLE.com?

I have 70+ mp3s on an outdated page. Id like any clicks for those mp3s to redirect to another website. Any ideas?
posted by Satapher to Computers & Internet (5 answers total)
 
Response by poster: ah, I could delete the mp3s and put the redirect in the 404 page eh? sigh
posted by Satapher at 1:04 PM on April 10, 2006


Best answer: You can put redirects in your .htaccess file to cover all of them in one go, if the server supports it. They generally do.
posted by bcwinters at 1:41 PM on April 10, 2006


The easies way to do this is to use .htaccess redirects. Add a line like this to the .htaccess file on EX.com (create an .htaccess file if one doesn't exist):

RedirectMatch /(.+)\.mp3 http://ample.com/home.html
posted by subclub at 1:43 PM on April 10, 2006


You can also put redirect statements in a <Directory> or <VirtualHost> or <location> tag in the apache config, rather then an individual .htaccess file. You'll need to do this if you're hosting on windows.
posted by delmoi at 2:01 PM on April 10, 2006


What i'd do is save an html file with an mp3 extension, but that'll only work if your server is configured to say that mp3 files contain html markup...
posted by fvox13 at 2:37 PM on April 10, 2006


« Older Where can I get customized thumb drives cheap?   |   Shorthand Newer »
This thread is closed to new comments.