I have a cookie on my site and would like to have this cookie in the url (*always), something like this: www.domain.com/?lang=en OR www.domain.com/subscribe/?lang=en
*(i'm not sure if i would like it ALWAYS, maybe i can exclude some directories i guess i can do this with adding a extra RewriteCond)
But the main problem is my code now results in a loop, below the code i use:
RewriteCond %{HTTP_COOKIE} lang=([^;]+) [NC]
RewriteRule ^(.*)$ /$1?lang=%1 [R,QSA,L]
Now my url results in: www.domain.com/?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en.... etc.
How can i simply add a cookie information to the url only once? and not loop all the time...