Forum Discussion
Jeff_C_42204
Nimbostratus
Aug 01, 2007Irule to set expires headers for static conent
Hello Dev Central!
I have an IIS 6.0 server that is not setting the expires header (cache-control is set) which is causing a potential performance issue.
I would like to remedy th...
Jeff_C_42204
Nimbostratus
Aug 01, 2007Ok I found reference in the following article that http::uri function is not allowed in http_response. It also shows that a session variable can be created to move the data you want into the response. I'm still working on this and it probably is not quite syntactically correct but let me know if you guy see anything glaring or if I seem to be on the right path.
http://devcentral.f5.com/wiki/default.aspx/iRules/FileNotFoundHandler.html
when RULE_INIT {
set OUTBOUND_URI $HTTP_URI
}
When HTTP_REQUEST {
set HTTP_URI [HTTP::uri]
}
when HTTP_RESPONSE {
if { [matchclass [OUTBOUND_URI] ends_with $::images]} {
set cachetime 86400
HTTP::header insert JeffTest "[clock format [expr ([clock seconds]+$cachetime)] -format "%a, %d %h %Y %T GMT" -gmt true]"
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
