Forum

help translating apache to hiawatha rule

Fred
12 December 2016, 12:25
Hi,

Could someone please tell me hot to conver the following rules in hiawatha format?
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"


Thank you
Hugo Leisink
12 December 2016, 13:26
UrlToolkit {
ToolkitID = expire
Match \.(js|swf) Expire 1 month
Match \.ico Expire 1 year
}
Fred
13 December 2016, 01:42
Thank you
Fred
14 December 2016, 12:55
Hugo,

Is your syntax above correct?
Should it say ExpirePeriod ?
Hugo Leisink
14 December 2016, 13:14
Oh, crap. I forgot that I moved the Expire option from the UrlToolkit section to Directory section. My bad.
Directory {
DirectoryID = expire_month
Path = /
Extensions = js, swf
ExpirePeriod = 1 month
}

Directory {
DirectoryID = expire_year
Path = /
Extensions = ico
ExpirePeriod = 12 months
}


If you ask me, there not much use for an expire time of a year for .ico files. Very likely that the browser cache is cleared in the meantime. Add the ico extension to expire_month for a simple configuration.
Fred
14 December 2016, 13:36
Thank you Hugo:)
Fred
14 December 2016, 13:51
Hi,

1 more question..
When do we use the [, public|private] option?
Hugo Leisink
14 December 2016, 14:16
Private: only the browser is allowed to cache the content.
Public: allow proxies to also cache the content.
This topic has been closed.