Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 7.5. Can't disable Url Rewriting rules (I deleted rules but they still affect)

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.

like image 341
ifeelgood Avatar asked Aug 23 '12 17:08

ifeelgood


People also ask

How do I disable URL Rewrite in IIS?

Open Internet Information Services (IIS) Manager > Servername > Sites > example.com > URL rewrite. Select each rewrite rule and disable them by clicking on Disable Rule.

Where are rewrite rules stored?

Rewrite rules can be either global (in the applicationHost. config file) or local (in the web. config file).

Where are IIS rewrite rules stored?

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.

How do you check if URL Rewrite is enabled IIS?

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.


2 Answers

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.

like image 106
SomeRandomName Avatar answered Oct 12 '22 11:10

SomeRandomName


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.

like image 44
Peter Kiss Avatar answered Oct 12 '22 09:10

Peter Kiss