We have the following cookie set by a product:

Set-Cookie: SSOCookie=T7ngsCmzC2FEq5p2a7o%3D; path=/; domain=.demo.com;

We would like to use Apache to remove the trailing ; which doesn't match the Cookie specification. Can we use mod_rewrite? How?

We are using Apache/2.0.47.

1 Answer 1


As you are referring to a Set-Cookie header, this must be in reference to a response being sent by the product to which you refer.

Assuming you cannot fix the product nor can the vendor, you will need to modify the response headers as required. You can't achieve this with mod_rewrite; it is for manipulating request URLs only.

mod_headers is described as as being for the "[c]ustomization of HTTP request and response headers". Examine the documentation for the 'edit' action.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.