You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Milan Trninic <mt...@galdosinc.com> on 2002/02/08 16:01:36 UTC
Content negotiation problem - returning the default variant
Hi,
I have two resources: index.html.en and index.html.fr.
If client hasn't configured the language (doesn't send Accept header) the server returns the default variant which is english.
If a client is configured to read for example, German only, then server returns "Not Acceptable" error. How can I make it return the default? The only way I have found is to make a copy of index.html.en and to name it index.html. But I don't want to maintain two identical files.
Anyone has a suggestion?
Thank you
Milan Trninic
Re: Content negotiation problem - returning the default variant
Posted by Game Wizard <gw...@netvision.net.il>.
use symvolic links for not maintaining two identical files.
for example
ln -s index.html index.html.en
GW.
----- Original Message -----
From: Milan Trninic
To: users@httpd.apache.org
Sent: Friday, February 08, 2002 5:01 PM
Subject: Content negotiation problem - returning the default variant
Hi,
I have two resources: index.html.en and index.html.fr.
If client hasn't configured the language (doesn't send Accept header) the server returns the default variant which is english.
If a client is configured to read for example, German only, then server returns "Not Acceptable" error. How can I make it return the default? The only way I have found is to make a copy of index.html.en and to name it index.html. But I don't want to maintain two identical files.
Anyone has a suggestion?
Thank you
Milan Trninic
RE: Content negotiation problem - returning the default variant
Posted by Joshua Slive <jo...@slive.ca>.
> From: Milan Trninic [mailto:mtrninic@galdosinc.com]
> If a client is configured to read for example, German only,
> then server returns "Not Acceptable" error. How can I make it
> return the default?
Ahhh, the eternal problem....
In 2.0 there is the new ForceLanguagePriority directive:
http://httpd.apache.org/docs-2.0/mod/mod_negotiation#forcelanguagepriority
In 1.3, you have found the only solution (a duplicate file without a
language tag). See http://ppewww.ph.gla.ac.uk/~flavell/www/lang-neg.html
for a good discussion of the issue. You can avoid maintaining duplicate
files by using symbolic links or server side includes to generate the
duplicate files.
Joshua.
---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org