I would not use mod_rewrite for this, but a more powerful language. Since Accept-Language is a list of weighted values (see quality value ), and the appearance of one of the identifiers does not mean that it is preferable to another value (especially q=0means unacceptable in general).
As already mentioned, use a more powerful language than mod_rewrite, analyze the list of values and find the best match between the preferred parameters and the available parameters.
Gumbo source
share