[Labs-l] Q: Language codes in rewrite rules?

Platonides platonides at gmail.com
Tue Sep 25 16:25:40 UTC 2012


On 25/09/12 17:24, Silke Meyer wrote:
> Hello unicorn people!
> 
> I have a question concerning Apache rewrite rules:
> 
> For Wikidata we don't have a whole wiki farm on our test system, but one
> repo installation and one client installation. We would now like to
> pretend we had separate wikidata instances for the languages
> (https://bugzilla.wikimedia.org/show_bug.cgi?id=40389).
> 
> For the rewrite rules, it would be practical to define variables, macros
> or something similar to tell apache "look, these are language codes".
> 
> Has anybody used anything similar and could point me to documentation or
> give me an example of how you did it??? Or would I actually use regex
> without referring to a predefined list?
> 
> Thanks for your ideas!
> Silke


Why don't you simply use a wildcard? That works well both for apache
rules and domains. You can then perform some filtering in php if you
want to reject non-languages.



More information about the Labs-l mailing list