Reputation: 33
My web root is /var/www/test/public, eg:http://www.test.local is rewrite to here, but there's a folder /var/www/test/documents/ where I store some pictures to let others download. How can I config my apache rewrite mod to allow users to download pictures in this documents folder by a url? Can anyone help me? Thanks!
Upvotes: 0
Views: 69
Reputation: 360872
You don't need mod_rewrite for that. You can use an Alias directive to map that images directory into your document root:
Alias /images /var/www/test/documents
^--web path ^---file system path
That'd make any request for example.com/images
be internally redirected to /var/www/test/documents, even though that documents dir is not within your site's webroot.
Upvotes: 1