On 6/19/06, Fenlason, Josh <jfenlason@xxxxxxx> wrote:
I know you can set it up so it will automatically select the correct language from a selection of something like this: /foo/bar.html.en /foo/bar.html.fr /foo/bar.html.es
That's called "MultiViews"
I want to do the same thing but specify the language in a folder in the path and not the file name at the end, such as: /foo/bar_en/foobar.html /foo/bar_fr/foobar.thml /foo/bar_es/foobar.html I've tried looking through the error document and content negotiation documentation, but I haven't seen anything that says this isn't possible or that it is possible and how to do it. Am I blind? Does anyone know if it is even possible? If it is, any pointers would be greatly appreciated. Thanks in advance.
Anything is possible. But if you want this all done "automatically", you should just restructure your files and use MultiViews. Multiviews cannot look across different directories. If you are dead set on using different directories, you can use a type-map file to specify the location of each language variant. See: http://httpd.apache.org/docs/2.2/content-negotiation.html Or, if you are a real glutten for punishment, you could have mod_rewrite peek into the Accept-Language header and set the directory. But Accept-Language parsing is actually pretty complicated, so you wouldn't be able to do a really good job with mod_rewrite. Joshua. --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx