I have been using the Microsoft x64 URL Rewrite Module for some weeks on my development computer successfully with the configuration:
<rewrite>
<rules>
<rule name="Catalogue">
<match url="/([0-9]+)/catalogue.aspx" />
<action type="Rewrite" url="/c/catalogue.aspx?wid={R:1}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
Today I had occasion to make a change to this rule but reverted it, but now I'm getting an error:
The expression "/catalogue.aspx?wid={R:1}" cannot be expanded.
I'm not sure what that means - anyone any idea. I subsequentlyl scoured the net for solutions and noticed that there was a more recent release (10 Nov 2008) of the URL Rewrite Module, so I installed that.
As an experiment I changed the target to a page called blah.aspx (which did exist) ie:
<action type="Rewrite" url="/c/catalogue.aspx?wid={R:1}" appendQueryString="false" />
but the same error message (note with catalogue.aspx and not blah.aspx in it) so I suspected some kind of cache issue. I noticed that you could add a registry key to diable internal caching of rewrite rules:
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v RewriteCacheEnabled /t REG_DWORD /d 0
though maybe this would be undesirable on a production machine. However since this is a development box, I applied it, ran iisreset and recycled the application pool for good measure, but it made no difference to the problem.
This leads to a side question: rather than disable the rewrite cache, is there a way of flushing it?
I then went to the Output Caching section of the website and then Edit Feature Settings and turned off both the cache and the kernel cache. Neither of them made any difference, so I turned them back on.
Can anyone give me any clues as to how to fix this?
TIA
Crispin