Re: configure one file with multiple mime types?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 18, 2010 at 08:31:15AM +0000, Nick Kew wrote:

> On 16 Mar 2010, at 00:00, Jack Bates wrote:
> 
> > How can I configure one file with multiple mime types?
> 
> Use mod_negotiation.

Thanks Nick - but I can't get type map working whatsoever : (

I created "manual.html.var",

URI: manual.html
Content-Type: application/xhtml+xml

I also added to my configuration,

AddHandler type-map .var

Now when I request manual.html.var, with "Accept: application/xhtml+xml",
Apache responds with the contents of manual.html - unfortunately it responds
with "Content-Type: text/html", not "Content-Type: application/xhtml+xml" : (

> GET /manual.html.var HTTP/1.1
> User-Agent: curl/7.20.0 (x86_64-pc-linux-gnu) libcurl/7.20.0 OpenSSL/0.9.8m
zlib/1.2.3.4 libidn/1.18 libssh2/1.2.2
> Host: ica-atom.org
> Accept: application/xhtml+xml
> 
< HTTP/1.1 200 OK
< Date: Fri, 19 Mar 2010 20:29:25 GMT
< Server: Apache
< Content-Location: manual.html
< Vary: negotiate,Accept-Encoding
< TCN: choice
< Last-Modified: Fri, 19 Mar 2010 17:53:49 GMT
< ETag: "4e1d538-56f23-4822b07912540;4ddc005-35-4822d1dbe69c0"
< Accept-Ranges: bytes
< Content-Length: 356131
< Content-Type: text/html
< 

I think by your suggestion to use mod_negotiation you're suggesting creating a
type map with,

URI: manual.html
Content-Type: application/xhtml+xml, text/html

- or -

URI: manual.html
Content-Type: application/xhtml+xml

URI: manual.html
Content-Type: text/html

^ I tried these as well - Apache always responds with "Content-Type: text/html"
: (

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux