Discussion:
Webserver says HOST can't be resolved when filetype is .doc
(too old to reply)
Wes Groleau
2011-03-09 05:43:07 UTC
Permalink
Directory contains about a dozen html files. Index.html contains links
to all the others. Same directory contains hundreds of Word files.
HTML files contain inks to the Word files. All links are relative, i.e.,
no protocol, no host, no path, and no slash.

wget "http://Lang-Learn.us/RTR/Immigration.html"

gives me the file I asked for

wget "http://Lang-Learn.us/RTR/Al otro lado.doc"

tells me that Lang-Learn.us doesn't exist.

Above is an oversimplification of the following:

MBP:~ wgroleau$ wget "http://Lang-Learn.us/RTR/Immigration.html"
--2011-03-09 00:39:51-- http://lang-learn.us/RTR/Immigration.html
Resolving lang-learn.us... 208.109.14.87
Connecting to lang-learn.us|208.109.14.87|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `Immigration.html.2'

[ <=>

] 5,973 --.-K/s in 0s

2011-03-09 00:39:51 (190 MB/s) - `Immigration.html.2' saved [5973]

MBP:~ wgroleau$ wget "http://Lang-Learn.us/RTR/Al otro lado.doc"
--2011-03-09 00:40:11-- http://lang-learn.us/RTR/Al%20otro%20lado.doc
Resolving lang-learn.us... 208.109.14.87
Connecting to lang-learn.us|208.109.14.87|:80... connected.
HTTP request sent, awaiting response... 400 No Host matches server name
lang-learn.us
2011-03-09 00:40:11 ERROR 400: No Host matches server name lang-learn.us.

The error looks like an issue with redirection or domain mapping,
but how could that be turned on or off by the file extension?
--
Wes Groleau

The man who reads nothing at all is better educated
than the man who reads nothing but newspapers.
— Thomas Jefferson
Wes Groleau
2011-03-09 06:06:16 UTC
Permalink
Post by Wes Groleau
wget "http://Lang-Learn.us/RTR/Immigration.html"
gives me the file I asked for
wget "http://Lang-Learn.us/RTR/Al otro lado.doc"
tells me that Lang-Learn.us doesn't exist.
I finally talked the guy into escalating to someone who
actually knows something about HTML, and after a while
they came back and said I have to fix it with .htaccess

I was skeptical, but I tried adding

AddType application/octet-stream .doc .xls .pdf

and it still doesn't work.
--
Wes Groleau

Aw, it Ain’t Important …
http://Ideas.Lang-Learn.us/WWW?itemid=58
Wes Groleau
2011-03-10 03:35:41 UTC
Permalink
Post by Wes Groleau
I was skeptical, but I tried adding
AddType application/octet-stream .doc .xls .pdf
and it still doesn't work.
Also tried

AddType application/msword .doc

with equal failure
--
Wes Groleau

Online Journal: Reading in a Foreign Language
http://Ideas.Lang-Learn.us/russell?itemid=1452
Wes Groleau
2011-03-11 03:45:53 UTC
Permalink
UPDATE: By using

<FilesMatch "\.html$">
ForceType application/octet-stream
</FilesMatch>

I verified that the server does allow .htaccess, but using .doc
instead of .html still gets that idiotic

"ERROR 400: No Host matches server name lang-learn.us"
--
Wes Groleau

In any formula, constants (especially those obtained
from handbooks) are to be treated as variables.
Swifty
2011-03-11 07:06:12 UTC
Permalink
On Thu, 10 Mar 2011 22:45:53 -0500, Wes Groleau
Post by Wes Groleau
ERROR 400: No Host matches server name lang-learn.us
You have something wrong in your virtualhosts setup (or your ISP
does).
--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Wes Groleau
2011-03-11 20:35:07 UTC
Permalink
Post by Swifty
On Thu, 10 Mar 2011 22:45:53 -0500, Wes Groleau
Post by Wes Groleau
ERROR 400: No Host matches server name lang-learn.us
You have something wrong in your virtualhosts setup (or your ISP
does).
_They_ do. Since they were clueless, I was hoping for a way to override
in .htaccess

Finally, after hours with more than one "tech supporter," I got them to
admit that they had a configuration error.

One of their early suggestions was that I ask the client to convert his
hundreds of Word files into HTML pages. They kept saying over and over
that I can't link to .doc because web browsers don't know how to render
Word files. (!)
--
Wes Groleau

As a rule
http://Ideas.Lang-Learn.us/BlindDog?itemid=4034
Wes Groleau
2011-03-11 20:36:29 UTC
Permalink
suggestions was that I ask the client to convert his hundreds of Word
files into HTML
Which would have been disaster because he doesn't know HTML.
He would have told Word to save as HTML......
--
Wes Groleau

Hispanics Hold the Key to Texas’ Economic Future
http://Ideas.Lang-Learn.us/russell?itemid=1564
m***@gmail.com
2012-08-01 20:38:54 UTC
Permalink
Hi Wes,

I am in the same exact situation you are in. None of the MS Office files download. This problem actually started when the hosting company migrated our website to a different server. They suggested me the same thing - adding the appropriate MIME types to my .htaccess, but that didn't help a bit. Now they say it is a problem with my code.

I am quite confident that the problem is due to a configuration mistake on their part. However, they are not ready to admit it. Do you mind sharing what the problem was, if you discussed it with the technical personnel? I have spent four days trying to debug this with no luck at all.

Thank you.

-- Varun Vats
Varun Vats
2012-08-04 07:41:55 UTC
Permalink
After much interaction with the support staff, they (actually the "Advanced Hosting Support" team) fixed the issue. They had to add the following to our .htaccess file for .xls and .xlsx file types. Something similar would be needed for other MS Office file types:

SetEnvIf REQUEST_URI ^/(.*)/*.xls$ no-jk
SetEnvIf REQUEST_URI ^/(.*)/*.xlsx$ no-jk

Hope this helps someone.

Loading...