I have very little htaccess experience, reading the Apache docs even made me more confused, so I'm here for help. I have no clue if this will even work, since I havent found any good tutorial online. I'm trying to rename an mp3/avi file on the fly through htaccess: real url: http://domain.com/folder/artist 1/album 1/title 1.mp3 what i want: http://domain.com/folder/artist 1/album 1/title 1 by domain.mp3 this will ensure that the person that downloads the file is getting a file branded by my domain. the php script that sends the user to download file is in http://domain.com/folder/ I do have htaccess enabled by my host, since i use it for joomla. Also, I welcome any other method that could also "temporarily" rename the file that a user requests. thanks in advance
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^folder/artist1/album1/([^.]+)-by-domain\.mp3$ folder/artist1/album1/$1.mp3 [L]
seeing that huge sticky, i knew you were gonna come thru fast.thanks for the quick response looks like i need some regex practice, i had been using (*.) instead of ([^.]+) to do this.