<div dir="ltr">Hello!<div><br></div><div>I have use-case where i need to check file presence in different directories.</div><div><br></div><div>For example, I have static file test.css with versions in different revisions:</div>
<div><br></div><div>/v1/static/test.css</div><div>/v1/static/test_v001.css (same as test.css in this dir)</div><div>/v2/static/test.css</div><div>/v2/static/test_v002.css (same as test.css in this dir)</div><div><br></div>
<div>In this case I want to make all files accessible by urls:</div><div><br></div><div>/static/test.css</div><div>/static/test_v001.css (test.css version 1)</div><div>/static/test_v002.css (test.css version 2)</div><div>
/static/test_v000.css (test.css in the last version)</div><div><br></div><div>Obvious solution that I see:</div><div><br></div><div>location / {</div><div style> root /var/www/</div><div style> try_files /*/$uri /v2/$uri =404;</div>
<div>}</div><div><br></div><div style>This way I specify latest version as v2, but here comes the problem: try_files does not support wildcards.</div><div style><br></div><div style>It is adequate to have support for wildcards (*) in try_files? Will you accept patch? Are there better and easier ways to solve my problem?</div>
<div><div><br></div>-- <br>Regards, Ian Babrou<br><a href="http://bobrik.name" target="_blank">http://bobrik.name</a> <a href="http://twitter.com/ibobrik" target="_blank">http://twitter.com/ibobrik</a> skype:i.babrou
</div></div>