Solved

Force file download

Posted on 2013-05-28
3
222 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
Comment Utility
What kind of server access problem?  Are you getting some kind of an error message?

Cd&
0
 

Author Comment

by:ddantes
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
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 …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now