Apache working with conditions
Posted on 2010-09-10
i've got a little problem, trying touse different rewrite rules files from inside virtual host directive.
My virtual host is listening at *:80, and ServerName is aa.lalala.com. Alternatively, i've got several ServerAlias like bb.lalala.com and cc.lalala.com. I need some way to load every rewrite rules file for every subdomain and i'm thinking if there exists any kind of "if" directive in apache to load a rewrite file based on host.
For ex.: if arrives a request for aa.lalala.com use rewrite_rules_aaa.txt, if request id for bb.lalala.com use another one, etc.
Any way for doing this exists? I've seen SetEnvIf Directive, but i'm not ensure if this is i'm looking for.
Thanks in advance!