asp.net mvc 4 - assistance needed with iis rewrite rule in web.config -
i working mvc4 applciation running in iis 7.5 , having problem rewrite rules have set up. next section web.config.
<rewrite> <rules> <rule name="rewriteimage"> <match url="/myassets/([_0-9a-z-]+)/images/category/([_0-9]+)-([_0-9a-z-]+)-([0-9]+)" /> <conditions> <add input="{request_filename}" matchtype="isfile" negate="true" /> </conditions> <action type="rewrite" url="/myassets/{r:1}/images/category/cat_{r:2}_{r:4}_{r:3}.jpg" /> </rule> </rules> </rewrite>
what want in above url rewrite images path.
i supply next url https://localhost/myassets/en-uk/images/category/123456-5x10-1_my+image+description.jpg
, expect rewrite https://localhost/myassets/en-uk/images/category/cat_123456_1_5x10.jpg
doesn't.
when test in iis, works fine, via browser rule never kicks in. looking suggestions gone wrong becoming frustrating!
this rule have, tried simple redirect rule redirects uppercase url's lower case urls , works fine.
one thing did notice in web.config, first rewrite tag has bluish squiggly under saying not recognised section of system.webserver.
application running in integrated mode.
iis asp.net-mvc-4 url-rewriting iis-7.5
No comments:
Post a Comment