What I have to write to the .htaccess file so that the visitors will be able to download .docx files?
-
Sounds like a browser configuration problem. Make sure your browser is configured to download files of the appropriate content type rather than trying to display them.
Also, you could try adding the
Content-Disposition
header, which can be done with theHeader
directive in Apache: http://httpd.apache.org/docs/2.2/mod/mod%5Fheaders.html#header Here's one explanation of how to use the header: http://support.microsoft.com/kb/260519From David Zaslavsky -
Are your docx files trying to be run as zip files from the client? Since Office2007 files are essentially just xml files zipped together, Unix treats them like regular zip files, due to their magic numbers. And thus Apache sends the wrong MIME type headers.
A rather succinct answer for this can be found in another serverfault question: http://serverfault.com/questions/19060/why-are-docx-xlsx-pptx-downloading-from-webserver-as-zip-files
ilhan : No, they are not run as a zip file but as a text file.ilhan : I have already tried the method in the link, it didn't helped.From Christopher Karel -
This is an IE problem, but easy to solve in the .htaccess:
<FilesMatch "\.(?i:docm|docx|xlsx|xlsm|xlsb|pptx|pptm|ppsx)$"> Header set Pragma private </FilesMatch>
Make sure you don't use SSL (https) or iE gives an error
From Beatniak
0 comments:
Post a Comment