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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -