[nycphp-talk] Downloading File Outside of the Root
Ben Sgro
ben at projectskyline.com
Wed Dec 3 15:33:15 EST 2008
Hello,
Why not just email them the book (size permitting)?
- Ben
Joseph Crawford wrote:
> If you want the file to live outside the www that's fine, but i doubt
> you can do it like you did in the rewrite. I would make the rewrite
> point to a php script that reads the file then outputs it for download
> using the appropriate headers etc.
>
> On Dec 3, 2008, at 3:23 PM, Randal Rust wrote:
>
>> We are working on a small site where the client has an eBook for sale.
>> Once the purchase is completed, we want to provide the link to the
>> file, which we'd like to have sit outside of the server root. We are
>> trying to work this out by modifying the .htaccess file with the
>> following command.
>>
>> RewriteRule
>> ^download/pdf/book.pdf
>> /home/cooking/wwwroot/pdf/book.pdf
>>
>> Unfortunately we keep getting 404 errors. This is a shared
>> environment, so the host may not even allow this, but does anyone see
>> anything that would keep this from working properly? FYI, I spaced it
>> out here for readability. It's one line in the file.
>>
>> --
>> Randal Rust
>> R.Squared Communications
>> www.r2communications.com
>> 614-370-0036
>> _______________________________________________
>> New York PHP User Group Community Talk Mailing List
>> http://lists.nyphp.org/mailman/listinfo/talk
>>
>> http://www.nyphp.org/show_participation.php
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
>
More information about the talk
mailing list