homepage Welcome to WebmasterWorld Guest from 54.226.0.225
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Modify cookies set by apache or other systems
modify cookies
dfresh4130




msg:4627655
 12:38 am on Dec 4, 2013 (gmt 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

 

lucy24




msg:4627665
 1:43 am on Dec 4, 2013 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved