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 question about having two blogs at the same host simultaneously. Here is my scenario: The first blog is hosted in the root directory http://mathosproject.com/, and the second is hosted in a sub directory, http://blog.mathosproject.com/, which is linked to mathosproject.com/blog/.

I have tried to manipulate the web.config file of the root, by making it excluding the directory blog as following:

<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="wordpress8" patternSyntax="Wildcard">
          <match url="^(blog|sample-page)*" ignoreCase="true" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_URI}" pattern="^/(blog|index)" negate="true" />
          </conditions>
          <action type="Rewrite" url="blog/index.php" />
        </rule>

        <rule name="wordpress" patternSyntax="Wildcard">
          <match url="*" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_URI}" pattern="^/(blog|index)" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php" />

        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

This actually helped me to be able to view the second blog, in blog, but as I processed to the sample-page, I was redirected to the first blog.

My question is, is there a way I can configure the web.config, so that it excludes a folder entirely?

share|improve this question
    
Is this a multisite installation? –  kaiser Nov 3 '12 at 20:09
    
The wordpress installation in the root is not, but the one inside the root folder, blog, is a multisite installation –  Artem Nov 3 '12 at 20:35
    
Multi-site cannot (yet) live in a sub directory. –  toscho Nov 3 '12 at 22:34
    
So, there are no ways of making web.config ignore a directory completely? –  Artem Nov 4 '12 at 10:41

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.