Use
-
a Apache
Alias
directiveAlias /uploads /var/uploads
(must be in httpd.conf) -
or a proxy PHP script that accepts a GET variable
filename=upload.jpg
and fetches the file e.g. usingfpassthru()
the latter is the least preferable option because it is resource intensive, but sometimes it’s the only alternative. It also needs proper securing to prevent an attacker from getting other files on your server through the proxy.