views:

28

answers:

1

Hi,

Was wondering if it's be possible to use sha1 as part of nginx rewrite rules. As in, for each file request, i'd like to redirect it to the sha1 hash of the file name. Haven't managed to find any references to this yet.

Thanks!

A: 

Found the module implementation:

http://forum.nginx.org/read.php?2,31852

In combination with a couple of other modules made by agentzh (detailed at: agentzh.org/misc/slides/nginx-conf-scripting/nginx-conf-scripting.html), it's possible to manipulate arrays and include sha1 and md5 encoding while modifying rewrite rules through nginx's rewrite module.

Didn't find an official release of the sha1-md5 implementation, but comments I found online suggest that the module above works as expected.

Ray