I am trying to implement some mod_rewrite RewriteRules using WordPressMU. I tried putting them in the Virtural Host file, but they did not appear to work. Since WPMU has a set of mod_rewrite RewriteRules in a .htaccess file, I wondered if the order of precedence was the problem. It seems that was indeed the cause. Here is the order of Apache configuration processing order of precedence that I found:

1. Apache configuration file is parsed top to bottom.
2. Included files are parsed right at their include location. In other words within the configuration file.
3. For directives which are called more than once, the last call overrides the previous calls.
4. For a directive called more than once in a directory tree, the lowest call in the directory tree takes precedence.
5. .htaccess directives take precedence over the main configuration file Directives.

So, it does seem that the .htaccess directives are overriding the Virtual Host file.

Thanks to this source for helping clear this up: http://data-based-systems.com/articles/papers/ApacheNotes.html

LEAVE A REPLY

Please enter your comment!
Please enter your name here