Set Cookie via Rewrite Rules

Atticus

Active Member
#1
Hi there,

Not sure if this would be considered a bug or a feature request, but to offer the benefit of the doubt we'll go with feature request :)

In the mod_rewrite documentation for Apache 2.2 there is support for setting cookies using rewrite rules. [see http://httpd.apache.org/docs/current/rewrite/flags.html#flag_co]

Our load balanced environment is causing problems for some automated update system (e.g. Wordpress, Drupal) and enabling session persistence would likely solve the issues we have been experiencing. The easiest way I can think of doing this is by setting a cookie whenever the viewer is accessing, for instance, http://mydomain.com/wp-admin/. In Apache, the following RewriteRule should spit out a cookie to the viewer which will trigger the session persistence --

RewriteRule ^/wp-admin/index\.php - [CO=wp_sptrack:true:.mydomain.net:0:/:0:1]

No matter how I try it this feature doesn't work. Assuming I am correct, would it be possible to add its support to Litespeed's rewrite system? If I am doing it wrong, any idea why?

Thanks for your time!
 

Atticus

Active Member
#3
Our load balancer is session aware, but if you're logged into the ACP of a product that session might not be removed after you've left the ACP. That's why we're looking to go this alternate route.
 
Top