Forum Discussion

Damien_Turner_1's avatar
Damien_Turner_1
Icon for Nimbostratus rankNimbostratus
Apr 09, 2009

Changing http headers

Hi all, I was wondering if someone could point me in the right direction?

 

My web guys are using apache to controll the http cache headers on our website, can I get an iRule to do this, I've seem some caching iRule's on the dev site but I'm not sure if it would work in my enviroment, as all I need to change is....

 

 

Expires: (too one hour ahead for time, so if the page is called at 10 am the expiry time will be 11 am)

 

Cache-Control: 0

 

Pragma: 0

 

And leave all the others un-touched.

 

 

Sorry if this is a simple one.

 

 

Regards

 

Damien

1 Reply

  • Hello Damien,

     

     

     

    you can replace headers with the 'HTTP::header replace' command, here is a very simple example to get you on the right track:

     

    =======

     

     

    when HTTP_RESPONSE {

     

    set ccheader "Cache-Control:0"

     

    HTTP::header replace Cache-Control [$ccheader]

     

    }

     

     

     

    =======

     

     

    Let us know if you have any further queries!