I have a WPMU install with a couple of sites on it. I'd like to add some subdirectories that are not wordpress blog pages but do contain working PHP code. They do not use any of wordpress's libraries and are not plugins.

The catch is that I'd like these subdirectories to only show up on a particular site. For instance, the hierarchy is:




should work while


should give a 404 error. Is there anyway to do this? I'm running Wordpress through Windows Server IIS7 if it is any help.


2 Answers 2


With the Apache web server, one would create a rule in the .htaccess file.

I believe the equivalent in IIS7 is the web.config file. This page appears to point in the right direction.

I would be more specific about where to place the file or how to construct the rule, but I have no experience with IIS7.

  • Thanks for your help! I was able to figure it out from the link Jan 1, 2013 at 22:03

I added the following section to the top of my web.config rewrite rules section:

<rule name="Movies Redirect" stopProcessing="false">
    <match url="\/?movies\.*" />
        <add input="{HTTP_HOST}" pattern="^.*dawson\.osmblags\.com.*$" negate="true" />
    <action type="Rewrite" url="{C:0}" />

This is working. Anytime someone attempts to go to something.osmblags.com/movies it redirects them back to something.osmblags.com rather than allowing them to view the custom code section. It limits the available permalinks but works fine for my purposes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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