Forum

Syntax error with EXPIRE directive

Christoph
12 June 2016, 14:51
Hi,

I'm trying to setup some cache settings - but I always get a SYNTAX ERROR message when I try to use an UrlToolkit with the EXPIRE directive (found here: http://dotbalm.org/http-caching-in-hiawatha/ ), e.g.:
UrlToolkit {
ToolkitID = cache-control
Match ^/.*\.(css|eot|gif|htm|html|ico|jpeg|jpg|js|otf|pdf|png|ps|psd|svg|swf|ttf|txt|woff|woff2)(/|$) Expire 2 weeks
}

Using version 10.3., after restarting it says: Syntax error in hiawatha.conf on line 90. (line 90= Match ...)

Thanks for your help !
Hugo Leisink
12 June 2016, 20:09
The Expire statement is no longer an UrlToolkit option. Since v10.0, it has been moved to the Directory section.
Directory {
DirectoryID = my_dir
Path = /foo/bar
Expire = 1 day
}
Christoph
13 June 2016, 13:52
Oops, sorry - my mistake.

I have used a snippet for the old syntax
This topic has been closed.