(Un)在mod_rewrite中设置一个cookie [英] (Un)setting a cookie in mod_rewrite

查看:173
本文介绍了(Un)在mod_rewrite中设置一个cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用mod_rewrite删除Cookie,但不幸的是后续请求(Chrome,FF,Safari)会保留旧的Cookie值。

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

Doku href =http://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_co =nofollow> http://httpd.apache.org/docs/2.4/rewrite/flags.html #flag_co )说:

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

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

所以我的RewriteRule是

So my RewriteRule is

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

任何胶水有什么问题?

干杯。

推荐答案

这最终为我工作:

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

希望它能帮助别人。

这篇关于(Un)在mod_rewrite中设置一个cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆