Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Un)setting a cookie in mod_rewrite

I'd like to remove a cookie using mod_rewrite but unfortunately the subsequent request (Chrome,FF,Safari) keeps the old cookie value.

Doku ( http://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_co ) says:

[CO=NAME:VALUE:DOMAIN:lifetime:path:secure:httponly]

So my RewriteRule is

RewriteRule .* target/ [R=301,CO=NAME:INVALID:.dev.local:-1]

Any glues what's wrong?

Cheers.

like image 290
pagid Avatar asked Aug 31 '25 01:08

pagid


1 Answers

This finally worked for me:

RewriteRule .* target/ [R=301,CO=NAME:INVALID:;:-1]

Hope it helps someone.

like image 138
pagid Avatar answered Sep 05 '25 02:09

pagid