* kajaa wrote: > Noticed that, > so, to make the "Available Languages" links work, do I have to use > RewriteRules?
depends ;-) If you have a 2.1 or a 2.0.47(-dev) [but will be released soon], you can use the config in <http://cvs.apache.org/viewcvs.cgi/httpd-2.0/docs/conf/httpd-std.conf.in?rev=1.27.2.11>. <http://cvs.apache.org/viewcvs.cgi/httpd-2.0/docs/conf/httpd-std.conf.in?rev=HEAD> is more simple, but currently only usable with 2.1 (not-yet-backported setenvif feature). > How do you manage the variant files in http://httpd.apache.org/docs-2.0/? There does actually a set of RewriteRules do the work (.htaccess file). You may need to adjust some paths. These rules probably will be modified (simplified; using prefer-language variable) next time somehow, but the following is the current state: # # typemaps for negotiation # Options Indexes FollowSymlinks <Files *.html> SetHandler type-map </Files> # # language detection # RewriteEngine On RewriteBase /docs-2.0/ # trailing slash for pure language RewriteRule ^(de|en|fr|ja|ko|ru)$ $1/ [R=301,L] # fix cross language links RewriteRule ^(?:de|en|fr|ja|ko|ru)(?:/+(de|en|fr|ja|ko|ru))+(/.*)?$ $1$2 [R=301,L] # grab chosen language # and fix URL. RewriteRule ^(de|en|fr|ja|ko|ru)/(.*) - \ [E=RURL:$2,E=CLANG:$1,E=RFILE:%{DOCUMENT_ROOT}/docs-2.0/$2] # trailing slash for deeper directories # (put the lang id before) RewriteCond %{ENV:CLANG} . RewriteCond %{ENV:RFILE} -d RewriteCond %{ENV:RURL} ^(.*[^/])$ RewriteRule ^ %{ENV:CLANG}/%1/ [R=301,L] # try chosen language # index file? RewriteCond %{ENV:CLANG} . RewriteCond %{ENV:RFILE} -d RewriteRule ^ - [E=RINDEX:index.html] # determine extension RewriteCond %{ENV:CLANG} . RewriteRule ^ - [E=EXT:.%{ENV:CLANG}] RewriteCond %{ENV:EXT} =.ja RewriteRule ^ - [E=EXT:%{ENV:EXT}.jis] RewriteCond %{ENV:EXT} =.ko RewriteRule ^ - [E=EXT:%{ENV:EXT}.euc-kr] RewriteCond %{ENV:EXT} =.ru RewriteRule ^ - [E=EXT:%{ENV:EXT}.koi8-r] # preferred language exists? RewriteCond %{ENV:EXT} . RewriteCond %{ENV:RFILE}%{ENV:RINDEX}%{ENV:EXT} -f RewriteRule ^ %{ENV:RURL}%{ENV:RINDEX}%{ENV:EXT} [L] # otherwise let the other modules do their work RewriteCond %{ENV:EXT} . RewriteRule ^ %{ENV:RURL} [L] # That's it ... nd --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
