Hi, I'm using a simple rules for an old ASP.NET site, here my iirf.ini:
# DON'T rewrite for static asp.net files
RewriteRule ^App_Themes/(.*)$ - [L]
RewriteRule ^/App_Themes/(.*)$ - [L]
RewriteRule ^/Scripts/(.*)$ - [L]
RewriteRule ^/category/(.*)$ /Category.aspx?idFnc=$1 [I,U]
RewriteRule ^/category/content/(.*)/(.*)$ /CatContent.aspx?idCat=$1&idFnc=$2 [I,U]
If i call the site to test the new rule, like: http://mysite/category/10
iirf rewrite the url correctly, but I have problems with resources that have a relative url, i.e. if the page renders an image with src='App_Themes/default/logo.png' that is not rendered,
instead if I change the src attribute to src='/App_Themes/default/logo.png' all works.
The problem is that in tons of server controls I must use the "~/App_Themes/" prefix to all static resources, and that is covnerted to a relative path, without the root "/"...
How can I change the rules to match this ASP.NET behavior?
Hope to have explained well ;)