On Fri, 30 Sep 2005, Christian Huegel wrote:

> Jann Forrer <jann.forrer <at> id.unizh.ch> writes:
>
> >
> > On Fri, 30 Sep 2005 solprovider <at> gmail.com wrote:
> >
> > > Deciding the Initial Language in Lenya:
> > > http://solprovider.com/lenya/languageinitial
> > >
> > > Someone else may answer how Apache httpd can Rewrite based on the
> > > visitor's browser's language choice (assuming it is possible), but the
> > > hack on that page works without the Rewrite module so it works with
> > > Jetty and other web servers.
> > >
> >
> > It ist possible by using the HTTP-Header Accectp Language as follows:
> >
> > RewriteCond %{HTTP:Accept-Language} ^de [NC]
> > RewriteRule ^/$ index_de.html [R]
> >
> > I did not test it but it should work like this
> >
> > Jann
> >
>
>
> Hi and thanks for your reply.
> No, it doesn´t work, the URL is still rewritten to index.html
> Here ist my configuration:
>

Strage the above rule works for me. That means if i put e.g. German (de)
as my prefered language in the browser language settings I get
index_de.html.

> <VirtualHost www.example:80>
>      ServerName www.example.com
>      ServerAlias www
>      ProxyRequests Off
>      RewriteEngine On
>      RewriteLog logs/www.example.com.rewrite.log
>      RewriteLogLevel 0
>    # Rewrite fuer ROOT
>    # RewriteRule ^/$ index_de.html [R]
>      RewriteCond %{HTTP:Accept-Language} ^de [NC]
>      RewriteRule ^/$ index_de.html [R]
>      RewriteRule ^/default/live/(.*)$ $1 [R,L]
>      RewriteRule ^/(.*) http://www.example.com:8080/default/live/$1 [P]
>      ProxyPassReverse / http://www.example.com:8080/
> </VirtualHost>
>
What does the RewriteLog say. If you set the level to 9 you will get quite
a lot of information ;-)

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to