I have one asp.net application (http://www.olddomain.com) hosted in IIS, now I developed a new version of same web application (http://www.newdomain.com) in asp.net and hosted same IIS machine with different name. I want redirect all old domains call to new.
For example if someone clicked on bookmarked old domain(http://www.olddomain.com/user.aspx?key=0001) then they need to redirect to newdomain (http://www.newdomain.com/user.aspx?key=0001). If the user is not login ed in newdomain then redirect to login if they logged in then redirect to exact page
I tried IIS URL Redirect option, Entered redirect URL as "http://www.newdomain.com$S$Q" in IIS. It not working as expected. If am enter url http://www.olddomain.com in browser then it redirect to http://www.newdomain.com If am entering URL like http://www.olddomain.com/user.aspx?key=0001then it redirecting to login page if already logged in state also.