0

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:

/wordpress/customapp

but

http://myfirstsite.something.com/wordpress/customapp

should work while

http://mysecondsite.something.com/wordpress/customapp

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

Thanks

2 Answers 2

0

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.

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

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

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

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, privacy policy and cookie policy

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