I’m trying to make a mod_rewrite which can set the language
the rewrite:
www.domain.com/da/page.php => www.domain.com/page.php?set_lang=da
So far I have comed up with this:
RewriteCond %{HTTP_HOST} domain\.com$ [NC]
RewriteCond %{REQUEST_URI} ^/(da|en)/(.*)$ [NC]
RewriteRule ^(.*)$ /%2?set_lang=%1 [L]
but I can’t figure out how you can send get vars with it too?
like this:
www.domain.com/da/page.php?cat=black&cow=ugly => www.domain.com/page.php?set_lang=da&cat=black&cow=ugly
yay! found a solution, but I don’t know if it could be done in a better way?