Forum Moderators: phranque
I've got a redirect to a login page on a different domain, and I'd like to pass the value of the cookie "MyCookie" held on the originating domain, i.e. something like:
Redirect 301 /pagethatredirects.htm [otherdomain.com...]
I can't find any reference to this on the web - perhaps because it is not possible?
Thanks for any help :-)
Use a RewriteCond to examine %{HTTP_COOKIE}, extract the data that needs to be passed, and then back-reference that subpattern in the query string of the RewriteRule's substitution URL using %1, %2, etc. as needed.
Make sure you're not 'exposing' any data to the other server (and all network nodes in-between) that might be considered 'private.' If you do, then this needs to be detailed in your privacy policy pages (both html and xml), and in your compact privacy policy headers. If you do business in the E.U., be very careful, as their laws are quite strict.
I'm giving this detailed heads-up because normally cookie data is available *only* to the domain that sets the cookie. And in this case, you may be essentially short-circuiting users' control over their cookie data. A court summons from Amsterdam or Brussels can be expensive -- even if just considering the air-fare and time lost...
Jim