In Apache, it’s possible to use mod_rewrite to put a cookie value into the URL transparently to the user:

RewriteEngine on
RewriteCond %{HTTP_COOKIE} cookiename=([^;]+)
RewriteRule ^(.*)$ /$1?cookie=%1 [L]

Replace cookiename with the name of your cookie.

In the RewriteRule %1 is the value of the cookie, $1 what is entered in the url bar.



Published

14 July 2009

Tags