modify http header

Sep 29, 2009 at 4:13 AM

RewriteHeaderCond %{cache-control} ^$

ModOrAddHeader cache-control  max-age=18000

ModOrAddHeader server ^$

 

will these be true?

Coordinator
Sep 29, 2009 at 1:53 PM

I don't understand the question. 

Will WHAT be true?

 

What is ModOrAddHeader?

I think that might be a feature of some other filter that is not supported on IIRF.

Sep 30, 2009 at 2:05 AM

yes u r right

those are some filter that is not supported on IIRF

when will that be supported?

thank U

Sep 30, 2009 at 2:06 AM

ModOrAddHeader  is created by me

it means  modify or add a new http header

 

Coordinator
Sep 30, 2009 at 2:14 AM

Read the doc, there is a RewriteHeader directive that may do what you want.

The RewriteCond directive can accept server variables, including surrogate server variables that are created to store http headers like cache-control.  Keep in mind that IIRF and other request rewriters work on the REQUEST, not on the response.  By the time the request has arrived at IIRF, it is not likely that inserting a cache-control header into the request will do anything.    IIRF does not inject headers into the response - your app must do that.  I can see the utility of examining the cache-control header in a rewrite filter, but not the utility of setting the cache-control header.  Unless there is some behavior in the back-end application that depends on the presence and value of cache-control.

anyway, check the doc.