php - Escape special characters in a filename -
We've got a system that allows file uploads to be originally used to access the file name of the original file - now We make a hash and change names, all uploads, but there are approximately 20,000 legacy files mostly in the + and () file names such as Bob_smith (2) .doc
We use all files through an htaccess rewriterule Passing and none of those characters give an error - it's all manually Ailnamon and related database column to manually is not a viable option file change we can avoid those characters at runtime so that rules rewrite can still work?
The current rewrite is:
RewriteRule ^ view / ([a-zA -Z0-9. \ -_] +) \. Php /documents/view.php?doc=$1 [L]
Comments
Post a Comment