You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Stefan Müller <St...@cl.uni-bremen.de> on 2004/05/10 10:19:18 UTC
[users@httpd] Setenv does not work was Re: [users@httpd] Language Negotiation and
language specification in HTML files
Hi,
Thanks!
This seems to be what I want:
> Example
> SetEnvIf Cookie "language=en" prefer-language=en
> SetEnvIf Cookie "language=fr" prefer-language=fr
I am trying to do this without cookies. The problem is that setenv does
not work at all.
I have the module loaded (I think), I have allowoverwrite fileinfo, but
when I put
SetEnvIf prefer-language=en
in my .htaccess it does not show when I call a cgi-script that is
supposed to tell me something about the environment variables.
Any suggestions on what I could change?
Is there a clever way to debug these setenv(if) directives?
Thanks and greetings
Stefan
--
Stefan Müller
Universität Bremen/Fachbereich 10 Tel: (+49) (+421) 218-8601
Postfach 33 04 40
D-28334 Bremen
http://www.cl.uni-bremen.de/~stefan/
http://www.cl.uni-bremen.de/~stefan/Babel/Interaktiv/
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Setenv does not work was Re: [users@httpd] Language Negotiation and language specification in HTML files
Posted by Tim Burden <Ti...@Burden.ca>.
SetEnvIf prefer-language=en should be
SetEnv prefer-language=en
or
SetEnvIf some_condition prefer-language=en
Without cookies, and without special URLs, how will Apache know your
language preference, once you've selected one that is not in the headers
your browser sends?
I had assumed you would do it like this: whn a browser first comes to your
site, looking for foo.html, it sees de in your Accept-Language header and
serves you foo.html.de. On that page there are links to select a new
language: probably looking like "foo.html?lang=en" or even just "?lang=en".
You might actually want to POST to such pages so that spiders won't try to
follow the links. And of course if they go to one of those links, you set a
cookie, and from then on Apache serves them foo.html.en, bar.html.en etc.
through mod_negotiation reading the cookie.
Of course, if you're gonna set cookies in some app language then of course
you might want to just do all your language logic in the app.
----- Original Message -----
From: "Stefan Müller" <St...@cl.uni-bremen.de>
To: <us...@httpd.apache.org>
Sent: Monday, May 10, 2004 4:19 AM
Subject: [users@httpd] Setenv does not work was Re: [users@httpd] Language
Negotiation and language specification in HTML files
Hi,
Thanks!
This seems to be what I want:
> Example
> SetEnvIf Cookie "language=en" prefer-language=en
> SetEnvIf Cookie "language=fr" prefer-language=fr
I am trying to do this without cookies. The problem is that setenv does
not work at all.
I have the module loaded (I think), I have allowoverwrite fileinfo, but
when I put
SetEnvIf prefer-language=en
in my .htaccess it does not show when I call a cgi-script that is
supposed to tell me something about the environment variables.
Any suggestions on what I could change?
Is there a clever way to debug these setenv(if) directives?
Thanks and greetings
Stefan
--
Stefan Müller
Universität Bremen/Fachbereich 10 Tel: (+49) (+421) 218-8601
Postfach 33 04 40
D-28334 Bremen
http://www.cl.uni-bremen.de/~stefan/
http://www.cl.uni-bremen.de/~stefan/Babel/Interaktiv/
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org