One blog inside another

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:

Read More
<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?

Related posts

Leave a Reply