I have some mp3 files which are named "my-audio.mp3" but now the client wants the visitor to be able to download and save these files to their desktop. He doesn't like the name with the hyphen and wants them renamed to "MyAudio.mp3". Other than putting the renamed files into their own 'download' folder, how can I make this work on Apache?
Tell me more
×
Webmasters Stack Exchange is a question and answer site for
pro webmasters. It's 100% free, no registration required.
|
You can do this in PHP like so:
|
|||||
|
|
Apache can be configured to follow symbolic links. I tested creating a symbolic link for the desired name to the old name. On the command line I did:
After which, Apache was happy to serve up the file at either To make it work you just have to have the correct option turned on in your
|
|||
|

