I am a bit puzzled about mod-rewrite and php and need your help please.
Right now, I have a simple htaccess rule as follows:
RewriteRule ^en/(.*)$ /$1 [QSA,L]
RewriteRule ^de/(.*)$ /$1 [QSA,L]
How can I check if "en" or "de" or nothing has been defined as the first "part" after documentroot (www.mydomain.net/en oder www.mydomain.net/de or www.mydomain.net) in order to include the appropriate language file then by using:
include_once(dirname(__FILE__) . "/../languages/lang." . $lang . ".php");
I already played around with request URI and dirname but I couldn't get it working so far.
In addition to that: How would I need to append the mod-rewrite rule in order to also support urls like www.mydomain.net/en/admin/settings ?
Any kind of help is much appreciated, thanks...