I have a WordPress install on a Windows/IIS server.

But, WordPress's URL rewrite rule is preventing the redirect in a sub-directory from being executed. I tried adding a condition to WP's rule, but to no avail.

How can I except a single directory from WP's rewrite rules?

Here's the current relevant code from the web.conf in webroot with my attempt at an exception rule: http://d.pr/n/xCI4


If you make the file non-writable by the webserver, then WordPress won't attempt to rewrite it, because it checks that it is writable before writing to it. So your custom rules can be preserved in this manner.

  • I'm confused. WordPress checks the file permissions before it attempts to rewrite the URL of that file through the index.php? – Kyle Johnston May 8 '13 at 21:12
  • No, WordPress checks the file permissions before overwriting the web.config file with its rules. Meaning that if you change the rules, then make it not writable, WordPress won't overwrite your changes. – Otto May 8 '13 at 21:49
  • I'm not having trouble with WordPress overwriting my rules. Rather, I need to know how to make a certain directory immune to WordPress's URL re-writes. – Kyle Johnston May 13 '13 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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