Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
Thanks for your help! I was able to figure it out from the link –  OSMman Jan 1 '13 at 22:03
add comment
up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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