Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Every time I restart my server my URL rewrite rules seem to get reset. Recreating them every time is obviously extremely frustrating!

I am running Windows Server 2008 R2 (fully updated), IIS 7.5 and IIS URL Rewrite 2.0.

Does anyone have any idea what could be causing this? Thank you in advance.

share|improve this question
You should mention at very least IIS version and what URL Rewriting software do you use. – LazyOne Aug 17 '11 at 0:41
@LazyOne My apologies, I have now updated my question. – Jonathan Aug 17 '11 at 15:09
The only thing that I can think of is that you have some sort of backup/recovery software installed that is restoring specified folders/files to the original state. If your rules are stored in web.config file and only rewrite rules gets lost (all other settings changes are preserved) then I have no clue at all :(. But check your start up items in any case -- maybe you somehow have specific commands that will remove such rules (yes, it can be done via command line). – LazyOne Aug 18 '11 at 8:55
up vote 3 down vote accepted

Rather embarrassingly I have found that the issue was not related to a server restart. Instead, the loss occurred every time I published my site. I'd been setting up the rewrite directly on my server as I was unaware that the rule data is stored in the web.config file, meaning every time I'd publish my site the file would just get overwritten with my clean local copy.

To fix, I just set up the rules locally in IIS and re-published my site.

share|improve this answer
same thing happened to me! Thanks for sharing! – The_Butcher May 7 '12 at 0:04
same thing here! Thanks for sharing too. – Bart Calixto Aug 11 '12 at 15:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.