Custom URL rewrite rules on WPNetwork

I have a theme that has some custom rewrite rules built in to it. The problem is that they are not working with WP multisite. On the install I use to build themes (which is outside of the network), it works fine. When I bring the theme into the network, it doesn’t work.



add_filter(‘query_vars’, ‘add_mls’:wink:;

function add_mls($public_query_vars) {

$public_query_vars[] = ‘mls’;

return $public_query_vars;



<?xml version=”1.0″ encoding=”UTF-8″?>





<rule name=”WordPress Rule 1″ stopProcessing=”true”>

<match url=”^index.php$” ignoreCase=”false” />

<action type=”None” />


<rule name=”WordPress Rule 2″ stopProcessing=”true”>

<match url=”^wp-admin$” ignoreCase=”false” />

<action type=”Redirect” url=”wp-admin/” redirectType=”Permanent” />


<rule name=”WordPress Rule 3″ stopProcessing=”true”>

<match url=”^” ignoreCase=”false” />

<conditions logicalGrouping=”MatchAny”>

<add input=”{REQUEST_FILENAME}” matchType=”IsFile” ignoreCase=”false” />

<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” ignoreCase=”false” />


<action type=”None” />


<rule name=”WordPress Rule 4″ stopProcessing=”true”>

<match url=”^(wp-(content|admin|includes).*)” ignoreCase=”false” />

<action type=”Rewrite” url=”{R:1}” />


<rule name=”WordPress Rule 5″ stopProcessing=”true”>

<match url=”^([_0-9a-zA-Z-]+/)?(.*.php)$” ignoreCase=”false” />

<action type=”Rewrite” url=”{R:2}” />


<rule name=”WordPress Rule 6″ stopProcessing=”true”>

<match url=”.” ignoreCase=”false” />

<action type=”Rewrite” url=”index.php” />






Now, the part that I see that is similar, but not identical is “WordPress Rule 3”, where in my test site, it looks like this:

<rule name=”wordpress” patternSyntax=”Wildcard”>

<match url=”*”/>


<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true”/>

<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true”/>


<action type=”Rewrite” url=”index.php”/>


So I went ahead and added the rule from my dev site to the network–but I still don’t get anything. Any pointers?