Solved

Force file download

Posted on 2013-05-28
3
227 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

751 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