web config - 301 Redirect Rule is not working when I use full URL -


i have rule in web.config on asp.net 4.5 , iis 7.5

<rule name="baad4041-5e25-499f-abb7-6bd4f76b2ed3" stopprocessing="true">     <match url="http://www.domain.com/thisisold.html" />     <action type="redirect" url="http://www.domain.com/newurl.aspx" />   </rule> 

it not seem work, when hit url, sends me 404. rule works:

<rule name="baad4041-5e25-499f-abb7-6bd4f76b2ed3" stopprocessing="true">     <match url="thisisold.html" />     <action type="redirect" url="http://www.domain.com/newurl.aspx" />   </rule> 

i need have full url match site has multiple domains, how can make happen?

you can try;

<rule name="test" patternsyntax="exactmatch">          <match url="http://www.domain.com/thisisold.html" />          <action type="rewrite" url="http://www.domain.com/newurl.html" /> </rule> 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -