Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 34708 invoked from network); 11 Mar 2008 22:07:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Mar 2008 22:07:24 -0000 Received: (qmail 52474 invoked by uid 500); 11 Mar 2008 22:07:10 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 52460 invoked by uid 500); 11 Mar 2008 22:07:10 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 52449 invoked by uid 99); 11 Mar 2008 22:07:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Mar 2008 15:07:10 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aleksandersen+apache.org@runbox.com designates 193.71.199.94 as permitted sender) Received: from [193.71.199.94] (HELO aibo.runbox.com) (193.71.199.94) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Mar 2008 22:06:20 +0000 Received: from [10.9.9.161] (helo=patch.runbox.com ident=Debian-exim) by greyhound.runbox.com with esmtp (Exim 4.50) id 1JZCc2-0001Sm-Mr for users@httpd.apache.org; Tue, 11 Mar 2008 23:06:22 +0100 Received: from [90.149.171.25] (helo=149-171-25.oke1-bras7.adsl.tele2.no) by patch.runbox.com with esmtpsa (uid:642103 ) (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) id 1JZCc1-0000zO-N5 for users@httpd.apache.org; Tue, 11 Mar 2008 23:06:22 +0100 From: Daniel Aleksandersen To: users@httpd.apache.org Date: Tue, 11 Mar 2008 23:03:45 +0100 User-Agent: KMail/1.9.7 References: <200803112054.38859.aleksandersen+apache.org@runbox.com> <200803112124.28818.aleksandersen+apache.org@runbox.com> <47D6F03F.3000804@rowe-clan.net> In-Reply-To: <47D6F03F.3000804@rowe-clan.net> Jabber-ID: aleksandersen@jabber.no MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200803112303.45507.aleksandersen+apache.org@runbox.com> X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Readable and L10N URIs with content negotiation and mod_rewrite/aliases On 2008-03-11, William A. Rowe, Jr. wrote: > Daniel Aleksandersen wrote: > > On 2008-03-11, Dragon wrote: > >> Daniel Aleksandersen wrote: > >>> Hi, > >>> > >>> I need some help to think clearer. > >>> > >>> To copy the example used on =C3=A2=E2=82=AC=C5=93Making readable URIs= =C3=A2=E2=82=AC=C2=9D at W3C: > >>> =C3=A2=E2=82=AC=C5=93A Norwegian without knowledge of basic English w= ould like to be > >>> able to remember "www.site.com/fiske/stenger" instead > >>> of "www.site.com/fishing/rods".=C3=A2=E2=82=AC=C2=9D > >>> > >>> What I am wondering about is how I would go about rewriting the > >>> URIs in Apache to allow for content negotiation at these two URIs. > >>> If a Norwegian requests =C3=A2=E2=82=AC=CB=9Cwww.site.com/fishing/rod= s=C3=A2=E2=82=AC=E2=84=A2, he should > >>> get redirected to the Norwegian URI and served the Norwegian > >>> document. Say the location of the two versions is > >>> "/fishingrods.html.en and fishingrods.html.nb. > >> > >> ---------------- End original message. --------------------- > >> > >> But what if a person with a non-English language > >> preference actually wants to view the English version? > > > > Then the user would click the link to get a cookie that would > > override the transparent content negotiation process. The idea of > > content negotiation is to suggest the best possible version > > automatically. > > See the httpd 2.2 conf/extra/httpd-manual.conf for how this is > rewritten to be in a specific language-space. (en/index.html vs > no/index.html) > > Now, if you want 12 different 'file names' for the same document, they > really can't be negotiated using conventional accept semantics because > foo.html(.en) ~=3D foo.html(.no) while foo.html(.en) is entirely > unrelated (in a uri-sense) to bar.html(.no). > > You can do it - I suggest rewrite map db's, but you'll be at this a > while, and likely create yourself a maintenance headache. So what is really the best practise? I thought of content negotiation as=20 trying to always serve the most appropriate version for all URIs, if not=20 especially told otherwise (by a direct link or cookie override).=20 Should I only use language focused content negotiation on the welcome=20 page/the index? =2D-=20 Daniel Aleksandersen --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org