downloadable pdfs - still not working

I just can’t get downloadable pdfs to work on my website. I followed Walt’s instructions and created a text file (using Smultron) as follows:

<FilesMatch “*.pdf”>
ForceType application/octet-stream

Next I named it myfile and uploaded it to resource folder (where all the pdfs are). So far, so good.

Next I rename the file .htaccess

Next I fire up the browser (Safari) go to the website. Here’s where things go bad. The website comes up okay, but all the image files are missing. Granted, this is a step up from when I tried putting the .htaccess file in the root directory (in that test the whole website disappeared).

Any suggestions on what I am doing wrong?

Thanks,

Craig


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry, this is what the myfile looks like:

<FilesMatch “*.pdf”>
ForceType application/octet-stream

craig


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just out of curiosity try this instead (in the .htaccess file), without the ‘~~~~’,

<FilesMatch ".(?i:pdf)$">

  ForceType application
/octet-
stream
  
Header set Content-
Disposition attachment

</FilesMatch>

Todd


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

And Tim has an Action if you have a php enabled server (all good hosts have them) ActionsForge - The Complete Repository of Freeway Actions

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Todd,

Hey, that works!

Any idea why it works? Why doesn’t the FilesMatch *.pdf (which is spelled out in the SoftPress KnowledgeBase) work?

“<“FilesMatch “*.pdf””>”
ForceType application/octet-stream
“</“FilesMatch”>”

Thanks much!

Craig


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Todd,

How were you able to type code into this box? When I typed mine in, everything disappeared between the “<” and “</”?


Dave,

Thanks for the PHP idea, I will look into that too.

Craig


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Any idea why it works? Why doesn’t the FilesMatch *.pdf (which is spelled out in the SoftPress KnowledgeBase) work?

I don’t understand the specifics of why it works. I have in the past successfully used the same example you tried so why it’s not working for you I can’t say. As is the case with many things there are multiple ways to achieve the desired result and there may very well be a better way than mine.

Just be sure to test it in a lot of browsers, including IE.

Todd


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Dave, I appreciate your help.
Joe


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options