I need some help. I have a cookie value that comes with a value of lang-cc that 
I need to use in a RewriteRule in the format of CC-LANG. I have tried setting 
two environment variables by backreferencing the cookie and using a regex. 
Admittedly, regex is not my strong skill. I am figuring that I am overlooking 
something pretty obvious so I am reaching out for any assistance.

RewriteCond %{HTTP_COOKIE} 
cookie_redirect=([a-zA-z][a-zA-z])-([a-zA-Z][a-zA-Z]) [NC]
  RewriteRule .* - [E=CKE_LANG:%1]
RewriteCond %{HTTP_COOKIE} 
cookie_redirect=([a-zA-z][a-zA-z])-([a-zA-Z][a-zA-Z]) [NC]
  RewriteRule .* - [E=CKE_CC:%2]

Possible values for testing could be cookie_redirect=en-us and ultimately be 
transformed into US-EN.

Thanks in advance,
Mark

Reply via email to