Solved

Force file download

Posted on 2013-05-28
3
226 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

735 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