User94323121 posted
Hi,
I want to versioning my .js and css files in IÌS with a rewriterule
I use this :
<script src="js/test-getdatetime-js-file-to-uncache.<%=System.IO.File.GetLastWriteTime(Request.PhysicalApplicationPath + "\js\test-getdatetime-js-file-to-uncache.js").ToString("yyMMddhhmmss")%>.js" type="text/javascript"></script>
So i got, for example :
<script src="js/test-getdatetime-js-file-to-uncache.110408025352.js" type="text/javascript"></script>
I want to create a rewrite rule for the .js file but it's not working. Im a newbie with REGEX.
I try this but it's not working :
<rule name="NoCacheOnModified" stopProcessing="true">
<match url="^js/test-getdatetime-js-file-to-uncache.[0-9]+.js$" />
<action type="Rewrite" url="js/{R:1}" />
</rule>
What's the correct rule for this?
Thanks