PDA

View Full Version : Virtual directories?


twaelti
1-30-05, 01:27 PM
I would like to put a few files in a folder "downloads" on my site, then setup two "virtual directories" such as "abc" and "xyz". Download links would then point to e.g. mysite.com/abc/thefile.zip or mysite.com/xyz/anotherfile.zip, while in fact the files only reside in the "downloads" folder.
- Can this be done without a .htaccess/redirect trick?
- If yes, how do I create such virtual folders? Is this what symblic links are used for?
- If not - which filepath does the enduser see after the redirect? (I would like to hide the original location of the files from the users' view)

Thanks for any support - My *nix knowledge is pretty nonexistant :)
-Tom

B&T
1-30-05, 02:27 PM
If you want to hide the files and make it so they can only be downloaded through your script, look here:
http://prettyworthless.com/tips.php?tip=download#tip

twaelti
2-3-05, 09:20 AM
Thanks for the feedback. Unfortunately, piping the file through a *.php script is not an option - I've experimented with this for a long time, and could never achieve satisfying, performing results. (It's all about a ~100 MB file, and even altough I even implemented resumable downloads in my php, this was never perfect).
As an alternative, I therefore plan to work with symbolic links that are only available temporarily (good for a few days).