Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Modify cookies set by apache or other systems

modify cookies

12:38 am on Dec 4, 2013 (gmt 0)

Junior Member

5+ Year Member

joined:Apr 3, 2009
votes: 0

I've run into a bit of a brick wall with my issue. We have an issue where we need to modify the cookies specifically for search bots. From my understanding mod_rewrite has the ability to create/set cookies, not modify existing ones. It seems the modification function is found in mod_headers. However, mod_headers seems to have no conditional match options so we could have it only apply to specific user agents. Has anyone run into this before and if so were you able to come up with a solution? Thanks
1:43 am on Dec 4, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
votes: 485

Rewind, please, because you've raised a much more interesting question than the one you asked. Have you come across search-eninge robots actively using cookies? Even the plainclothes bingbot-- which is as humanoid as the come-- hasn't shown up with cookies yet.

From my understanding mod_rewrite has the ability to create/set cookies, not modify existing ones.

This may be a distinction without a difference. Within mod_rewrite you can read the existing cookie in a RewriteCond and then set a new one using the values of the old one. So even though you're technically defining a new cookie, you don't have to throw away the content of the old one.

One of the stock answers in this subforum is: Explain in English exactly what you want to do. I have a couple of UA-based cookies* myself, but your situation sounds a little more complicated.

Edit: I'd assumed you were asking about outgoing cookies sent with the response header. Are you, instead, asking about incoming cookies arriving with the request header? Brr. (Have to say I don't perfectly understand why messing with the request header would even be necessary, but obviously the capability exists for a reason.)

* At least in theory. I don't think anyone has ever matched the precise combination of circumstances that would trigger the cookie. But it's sitting there in htaccess all the same.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members