I'm using mod_rewrite in a PHP web system and I have this rewrite rule in my .htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+).(pdf)$ /static/data/biblioteca/$1.$2 [L]
which allows me to write
<a href="http://my_domain.net/some_file.pdf" target="_new">title_of_some_file</a>
and have the PDF file opened directly in a new browser window, with the advantage of disguising my directory structure when the source page is seen.
This is working fine but for one thing. I live in Brazil and the Portuguee language has signs symbols "á", "é", "ã", "õ" and most of the the titles of the books available have these symbols.
When I use urlencode to obtain a proper filename it seems mod_rewirte gets confused, because then it redirects the file but I receive an error 404!
I know I may gve up the symbols, replacing "ã" by "a" and so on, but I do not want to do so, because some embarrasing mistakes may occur. For instance, in Portuguese we have "côco" meaning coconut and "cocô" meaning shit. If I replace "ô" by "o" both words will be written the same, with all possible (and disgusting) distortions of the meaning.