Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    .htaccess and forced download of certain file types

    I tried to force download of certain file types - pdf,doc,jpg - instead of opening them in applications. I used
    AddType application/octet-stream .pdf
    AddType application/force-download .pdf
    but it doesnt works. Has anybody an idea how to solve this problem? thx, brdik

  2. #2
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Behind You!
    add this in .htaccess

    <Files *.pdf>
    ForceType application/octet-stream
    Header set Content-Disposition attachment
    </ Files>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts