Questions tagged [mod-negotiation]

6 questions
7
votes
2 answers

Using mod_negotiation to serve webp if the UA requests it

Is it possible to use mod_negotiation to serve up a webp image if the browser supports it, and a jpg otherwise? For instance, if I link to an image with the path /images/test, it serves the image found at /images/test.webp if the UA knows about…
Rich Bradshaw
  • 71,795
  • 44
  • 182
  • 241
4
votes
2 answers

Get Apache to auto-decompress a file, but only if needed

I'd like to keep all the static files of my web-server locally compressed, and to serve them either compressed or not, depending on the request. The answers in How can I pre-compress files with mod_deflate in Apache 2.x? , are close, since indeed by…
Stefan
  • 27,908
  • 4
  • 53
  • 82
4
votes
2 answers

Serving multi-language static content via Apache for a Web Application

I have some multi-language static content which I wish to serve via Apache. The files are cache files generated JIT by the app so if they're there, they should be served, otherwise forward the request to application which will create them…
3
votes
1 answer

(Jekyll?) automatic i18n (with Apache’s mod_negotiation)?

I speak fluently in French and English. I would like my website to be displayed in either language, depending on the visitor’s language setting. For the record, this information is provided by the visitor’s browser, a Accept-Language HTTP header. As…
Diti
  • 1,454
  • 3
  • 23
  • 38
1
vote
1 answer

Language selection via MultiViews only works partially when requesting another resource

I have a little site that's available in different languages which are selected based on the following criteria (increasing order of preference): Accept-Language sent by the browser A cookie specifying the preferred language The request path…
Joey
  • 344,408
  • 85
  • 689
  • 683
1
vote
0 answers

Hide ALL file extensions from URL with .htaccess

I want to hide all file extensions from the URL with .htaccess without defining each extension in the .htaccess. I have found a few options out there using mod_rewrite and mod_negotiation, but either they are incomplete or not explained well. I'd…