NiklasBr - 2015-08-14

You should probably avoid spaces in URL:s. See http://www.ietf.org/rfc/rfc1738.txt and search for 'spaces' or scroll to page 2.

Spaces often work on the web because browsers encode then when encountering and servers decode them.

If the files are uploaded through some PHP app by regular users, maybe you can try to transliterate them and replace all spaces with dashes or underscores? That should be mostly solid.