I develop ASP.NET MVC 3 application. I've downloaded UrlRewriting module and created some rules for my website locally. Next i published this website on the Internet to check performance. Thats ok. Then i continued my work locally again. I commented code block in the web.config file regarding these rules. So there are no rules in IIS Manager too. The problem is that rules still affect! For example, i defined "Canonical hostname rule" to redirect browser to "www.*" site name. So this rule still affect, i.e. local IIS server redirect my locally running website to the real one on the Internet. Also i installed IIS Express to try it out too. Result is the same. I cant figure it out where the problem is. So, there are no rewrite rules on IIS server and IIS Express, but they still affect.
Open Internet Information Services (IIS) Manager > Servername > Sites > example.com > URL rewrite. Select each rewrite rule and disable them by clicking on Disable Rule.
Rewrite rules can be either global (in the applicationHost. config file) or local (in the web. config file).
When done on the server level it is saved in the ApplicationHost. config file. You can also define it on the folder level, it that case it is saved in a web. config file inside that folder.
To see if the URL Rewrite module is installed, open IIS Manager and look in the IIS group - if the module is installed, an icon named URL Rewrite will be present.
Late answer is late. Most likely the redirect was "permanent" so a 301, then it will be cached in the browsers. If you want it to be temporary redirect with code 307.
The URL Rewrite module seams to my a little buggy when the configuration changes becouse the loaded configuration doesn't refreshed until the IIS isn't restarted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With