I did my best to search in stack overflow questions and answers and even when I tried to apply a solution, it is not working.
I need to redirect all adresses, that begin with
http://www.example.com/index.php?lang=XX
to
This is what I try:
RewriteCond %{HTTP_HOST} ^www.example\.com [NC]
RewriteRule ^(index\.php\?lang\=)$ http://www.example.com/$1 [L,R=302]
The location /index.php?lang=en is not redirecting /en (anywhere). It is at the same URL.