httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matus UHLAR - fantomas <uh...@fantomas.sk>
Subject Re: [users@httpd] ErrorDocument Question
Date Tue, 20 Jun 2006 07:29:26 GMT
On 19.06.06 12:14, Fenlason, Josh 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
> 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.

I would use "ErrorDocument 401 /foo/bar.var" and set up up bar.var according
to http://httpd.apache.org/docs/1.3/content-negotiation.html like this:

URI: bar

URI: bar_en/foobar.html
Content-Type: text/html; charset="us-ascii"
Content-Language: en

URI: bar_fr/foobar.html
Content-Type: text/html; charset="iso-8859-1"
Content-Language: fr

URI: bar_es/foobar.html
Content-Type: text/html; charset="iso-8859-1"
Content-Language: es

URI: bar_en/foobar.html
Content-Type: text/html; charset="us-ascii"; qs=0.1

(the last one as failsafe default...)

Note that you need mod_negotiation loaded and type maps defined:
AddHandler type-map .var


P.S. I haven't tried this (I use .var but not for ErrorDocument) but it
should work...
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Due to unexpected conditions Windows 2000 will be released
in first quarter of year 1901

---------------------------------------------------------------------
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


Mime
View raw message