.htaccess - Remove all cookies

Posted by BlaM on Server Fault See other posts from Server Fault or by BlaM
Published on 2009-05-19T08:03:47Z Indexed on 2010/04/12 22:23 UTC
Read the original article Hit count: 643

Filed under:
|
|

I want to make an existing domain a "CDN" domain that serves all images, CSS and JS files (i.e. static files). However that domain was parked earlier and some application on that domain has set cookies.

As far as I can observe, I'd say that with cookies the "Expires" header doesn't seem to have much effect with some browsers (Including Firefox). The browsers still request the file, even if they shouldn't do so for the next month.

It would be possible to do some mod_rewrite tricks to detect if there are any cookies and then call a PHP file to remove the cookies and serve the static file so that for the next call there aren't any cookies left, but maybe you can give me a simpler method:

Is there a "Apache .htaccess only" way of removing all existing cookies?

© Server Fault or respective owner

Related posts about apache

Related posts about cookies