c# - Rewrite rules into web.config for js and png files -
i have application asp.net, web api c# , used https , want js, css files , images sent http. try different thinks didn't work. i've tried this:
<rewrite> <rules> <rule name="redirect image http"> <match url=".*\.(gif|jpg|jpeg|png|css|js)$"/> <action type="redirect" url="http://{server_name}/{r:1}" redirecttype="seeother"/> </rules> </rewrite>
what doing wrong?
try this
<rules> <rule name="redirect image http"> <match url=".*\.(gif|jpg|jpeg|png|css|js)$"/> <action type="redirect" url="http://{server_name}/{r:1}" redirecttype="found"/> </rules>
Comments
Post a Comment