rejetto forum
Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: 1001questions on May 26, 2013, 02:35:27 AM
-
There must be someone out there that knows how network events work in version 2.3 beta #284? It would be most appreciated if somebody could direct me on how to: execute the "script command line" in HFS.EVENTS, when the incoming "requested GET" to "myserver" is not a browsing request, but is a "requested GET" only seeking to linkup to a image file on "myserver"? --i.e. (example) <img src="myserver.com"> (this being the incoming request to my server!) The network event: [request] before the "script command line" in HFS.EVENTS does not work! MY script command line DOES NOT get executed! It DOES get executed with a regular browsing request, though, so there is not a problem with my "script command line" --Somebody please help me on this. It would be most appreciated. thanks
1001questions
-
[request] is supposed to be executed for both pages and files.
to tell when it's looking for an image, you can just check if the address ends with a jpg/gif/png
address is %url%
to check it we have {.match.}
so
{.if| {.match| *.jpg;*.gif;*.png | %url% .}
| hello, you are searching for an image
| anything else
.}
i didn't test it