Hi,
I am trying to do this:
Have bar.html and bar.html.ja on disk
to ease browsing on file system, I want to keep bar.html (and not use bar.html.html) and I need to do conneg between bar.html (in english) and bar.html.ja (in japanese).
Here is what I tried (with no luck :) )
Code:
MultiviewsMatch Handlers
RewriteEngine On
RewriteBase /foo
RewriteCond %{ENV:foobar} !^Yes$
RewriteRule bar.html$ bar-html.var [L]
RewriteRule bar.html.en$ bar.html [E=foobar:Yes]
bar-html.var contains this:
Code:
URI: bar-html
URI: bar.html.ja
Content-Language: ja
URI: bar.html.en
Content-Language: en
When Accept-Language: contains ja, it works and gives me the japanese version
So, the first rewrite
Code:
RewriteRule bar.html$ bar-html.var [L]
works, then the .var kicks in
returns bar.html.ja, all fine.
When it is not set, I see that it reaches the limit of redirects.
So... first rewrite works, then with the .var bar.html.en is requested, then... the rewrite setting the 'foobar' variable does not work. adding a [L] didn't help either.
Where is the bug :) ?
(I am using Apache 2.2.9)
Cheers,