views:

24

answers:

1

Hi all,

Alright im doing a site which is available in multiple languages. I have ran into some problems with my mod rewrite. I'm trying to do this:

Normal page without extra querystrings: /en/whatever

And the page with problems (with querystrings): /en/dashboard/project/projectid

And my .htaccess:

RewriteRule ^en/(.*)$ $1?lang=en [NC,L,QSA]
RewriteRule ^dashboard/project/([a-z0-9]+)$ projectdashboard.php?id=$1

But the ?lang=en is getting lost when opening this page: /en/dashboard/project/projectid

+1  A: 

Use the QSA flag in both rules:

RewriteRule ^en/(.*)$ $1?lang=en [NC,QSA]
RewriteRule ^dashboard/project/([a-z0-9]+)$ projectdashboard.php?id=$1 [QSA]
Gumbo