Get IE 10 to download .dwg files - .htaccess

I'm creating a web app that has a list of several .dwg files (These are AutoCAD drawings FYI).
I have an image of a .dwg icon that when clicked is supposed to download the .dwg file. This works in every other browser except IE 10. IE 10 just displays a blank page when the link is clicked, and the url displayed is that of the correct .dwg file. I'm assuming IE 10 is trying to open and display this file much like it would a .pdf, but I'm not certain of this.
I'm using xampp to access the page, and I've tried configuring the .htaccess file to do a force download of .dwg files but to no avail. My .htaccess file is below. I'm new to configuring .htaccess files, but from what I've been reading this is the proper way to do a force download.
AddType application/acad .dwg
AddType application/octet-stream .dwg
#Note that this is my entire .htaccess file
I tried this without the "application/acad .dwg" line at first, then I tried adding the MIME type but that did not work either.
I think it is worth noting that, as a test, I tried to force download .pdfs using the method above. This did not work either.
So I also tried looking in the httpd.conf file to see if there was a module that was commented out I could use, however, the instructions in the file told me not to mess with anything unless I knew what I was doing. I'm pretty new to this, so I looked through the modules for something obvious but couldn't find anything.
So my question is: How do I get these files do download in IE 10?
Other things to note:
The files are downloaded by every other browser I've tried. (I have access to a machine with IE 8 and even that downloads the files)
I do not have any browser extensions from Autodesk that would interfere with this. (The only non-out-of-the-box extension I have is avast! WebRep, however, this is on all other browsers as well.)
All .dwg files are not corrupted and perform normally.
Probably most importantly, my .htaccess file is working and is recognized. To test this I typed in junk text, saved it, then received a 500 error when I tried to reload the page.

Related

Does the htaccess file change any other files on update?

I added 3 lines of code to the htaccess folder to remove the file extension on the directory, that broke many links, I reverted it back to the default file and the same errors are happening. I don't have the lines but I just need to know if there is anything else this folder changes after the changes take effect.
#MrWhite's comment was correct: It ended up being just cached data saved in Chrome. I just had to clear the cache on Chrome to solve the issue.

I can't find htaccess in typo3

I am using Typo3 4.5., and am running into the problem which appears to be solved here: TYPO3 breaks urls without WWW ... (website redirects to index without WWW)
The answer recommended there involves editing the htaccess file.
My problem is I cannot find this file anywhere. I am not experienced with Typo3, how can I safely edit this document?
I have gone into my filelist and found an htaccess file at [fileadmin/]: temp/ but I cannot edit this document. Clicking on it gives me an error 403 in a new window. In german nonetheless.
Even the question is related to a very old TYPO3 version I want to answer here for the current version 9.5 where several .htaccess files are saved in the folder
typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/
These are the files in that folder:
fileadmin-temp-htaccess
fileadmin-temp-index.html
fileadmin-user_upload-temp-importexport-htaccess
root-htaccess
root-web-config
typo3temp-var-htaccess
All files with htaccess at the end (above bold text) should be used according to the filename, copied in the corresponding directory and each copy then renamed to .htaccess.
The other files should be used too according to name and content.
It has to be considered that .htaccess-files perhaps are not exchangeable always between TYPO3 versions; I never had problems with it during many updates but it should always be checked.
The .htaccess file is a hidden file and is located in the document root of your website. This file can't be edited from inside of TYPO3, you need direct access to the webserver (ssh, sftp, ...)
If you installed TYPO3 from the "dummy package", it should have a "_.htaccess" file in the root that must be renamed. As the previous answer by #M Klein told you, you must rename or edit it by direct access to your server.
Another possibility is that the file has been accidentally removed; in this case you could download the "dummy package" (select your TYPO3 version) and pick a new one from there.

Nodejs: Detect file type without extension

I'm looking to remotely download and detect a file from a website, like this
http://examplewebsite.com/100/download
When viewing in my browser, this automatically downloads as the appropriate file type, 100.pdf, but sometimes it can be a .xls or .doc file. etc.
Looking at libraries available, like file-type, it only works if you already have the extension
Is this possible?
If you have the url, you can split by '.' and select the last element of your list.
The file-type library you linked in your question actually checks the source of the file to guess. It doesn't use the file extension at all.

How can I get Adobe .pdx file to work online?

Have thoroughly googled this topic without any luck finding a workable solution. On my laptop I created a folder containing a collection of 280 PDF documents. Within that folder are two additional files created when I ran a "Full Text Index With Catalog" using Adobe Acrobat XI Pro: .LOG and .PDX files. Also within the folder is a sub-folder containing index.idx and index1.idx. The index1.idx contains all the results of the search index. The index works great when operating locally on my laptop.
My aim is to make this PDF collection available to the public. I uploaded the entire folder to my website and created a webpage with a link to the .PDX file expecting the search index to work on the website the way it works on my laptop. No such luck! Using both Firefox and Chrome yields pretty much the same results: the PDX file tries to open files on my computer rather than the set of files stored on the website. Here's what happens depending on whether the PDX is opened with Acrobat or Reader:
"You have chosen to open this PDX file. Open with ..." I selected Adobe Acrobat. This results in an error message:
"Search could not load the index
(C:\Users\Name\AppData\Local\Temp\library.pdx.
You may need to rebuild this index."
If I try to open the .PDX by navigating to the Adobe Reader software on my computer (AcrRd32.exe), I get the following:
"The operation you are trying to perform potentially requires read
access to your drives. Do you want to allow this operation?
How can I get this to work from the website? Alternatively, are there other options out there to achieve the same result?
How can I get this to work from the website?
You can't.
The index created by Acrobat is designed to work with the desktop versions of Acrobat and Reader. However, there are a number of search engines that index PDF files including Google but none of them will open and highlight the search terms like you see in Acrobat/Reader.

getting UTF-8 text files to display on all browsers

I would like my Web page
http://www.gmarks.org/math_in_e-mail.txt
on my Apache 2.2.14 server to display correctly in all browsers on all platforms (or something approaching this). I have included the line
AddDefaultCharset utf-8
in the appropriate .htaccess file. I find, however, that on my own machine, running Ubuntu 10.04, the page displays exactly as I would like only in the Google Chrome browser. Problems in other browsers: in Opera the last two lines do not display, in Firefox the subscripted aleph’s are too small, in rekonq the last two lines display incorrectly with various Fraktur characters repeated and others not displayed, in Midori the Opera and Firefox problems both occur, in Arora the Firefox and rekonq problems both occur, in Epiphany the Opera problem occurs.
Is there something else I could put in my .htaccess file, or some other configuration I might set up, to get that Web page to display correctly everywhere? I suppose I must rely on the font set each user has installed on his or her computer (obviously it defeats the purpose of the Web page to use something like GIF images). I find the differences among the browsers strange: does each browser include its own set of fonts in some configuration file, or do they access some directory containing fonts for the entire computer? (And is the answer to the last question OS-dependent?)
Further questions: would I do better to change the line in my .htaccess file to
AddCharset UTF-8 .txt
and is there a way I can make the .txt file display by default with an increased font size?
A browser will not know the text is UTF-8 encoded unless the text starts with a UTF-8 BOM (assuming the browser even looks for that) or the HTTP Content-Type header specifies UTF-8 as the Charset, ie: Content-Type: text/plain; charset=utf-8. If AddCharset tells Apache to generate that attribute for .txt files, then great.
There is no way to specify a font for a .txt file by itself. You have to use HTML for that. To specify a font for a .txt file, you would have to write a server-side script that outputs an HTML wrapper around the .txt file content and then sets the HTTP Content-Type header to specify text/html instead of text/plain as the data type.

Resources