Solved

Force file download

Posted on 2013-05-28
3
225 Views
Last Modified: 2013-05-29
When visitors click on a link to a pdf file in my website, I would like them to see a dialog box which invites them to save the file, instead of opening it.  This would avoid needing to instruct them to right click and save as.  I'm unfamiliar with htaccess, but I created one with the intention of forcing download of pdf files.  Instead, it created a server access problem.  Please advise.htaccess.txt
0
Comment
Question by:ddantes
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39201790
What kind of server access problem?  Are you getting some kind of an error message?

Cd&
0
 

Author Comment

by:ddantes
ID: 39202678
Thank you for your participation.  Here's a screen shot.  The error happens when I try to access the pdf, if htaccess is in the same directory.server error
0
 

Author Comment

by:ddantes
ID: 39203824
I think this is an issue for my web host.  If I place the .htaccess file in other directories which contain pdf files, the "save/open" dialog is triggered by accessing the pdf.  The server error happens only in a particular folder, which is in my secure website.  I'll check the error log and discuss with web host.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question