Hi guys,
I recently discovered the power of the mod_rewrite module and I need some help with it.
Say I have a website which has two domain names mapping to the same host...
example.com
example.net
And I would like to set a GET var depending on the the HTTP_HOST (i.e. .com OR .net ?) ...
/index.php?lang=en
/index.php?lang=es
However the caveat is this.. I already have 3 RewriteRules...
RewriteRule ^(about|contact)/?$ /index.php?page=$1 [NC]
...
..
And if I were to follow the example over here (bottom of RewriteCond) I would have to copy the 3 RewriteRules for each HTTP_HOST (i.e. .com OR .net) and add the GET var statically like; &lang=en OR &lang=es and the end of each rule...
Is there some way to do this automatically without having to copy the 3 rules all over again which only differ by just one get var at the end?
PS. I know this can be done through the scripting language, but I was wondering if this can be done through mod_rewrite, and how.
thanx!