I can't. This is a server where a group of users upload files through FTP. Then they access their file by using the URL http://www.pirate-punk.com/thefile.zip where "thefile.zip" is the file they have uploaded through FTP.
This is public URL is just an htaccess "virtual url" (rewriting) to access the real URL at = pirate-punk.com/dl.php?f=thefile.zip
Then this PHP file will locate the file on the server and generate a rawurlencode'd link.
Everything works perfectly except then i use plus signs or "&" symbols because it breaks the GET['f'] in dl.php
http://www.pirate-punk.com/86 Crew - 2000 - Bad Bad Reggae.zip
Also works with accents:
http://www.pirate-punk.com/Affliction - De La Révolte A La Révolution.zip
The problem is only when the filename has characters like + or &
I need to find a way to escape the + and & in the htaccess file that passes the filename to dl.php ...
is it possible to base64 encode the filename in the htaccess ?
so the htaccess would transform http://www.pirate-punk.com/Bérurier Noir + Haine Brigade - Split 7'' Ep.zip
Then dl.php could decode the base64 and the problems with + and & would be avoided.
Edited by ungovernable, 19 June 2013 - 07:25 PM.