web.config for IIS 7.5 for rewrite rule for two CMS

Please LogIn to Reply!

Post By: admin | 26-01-2012 06:35 Reply

I run different CMS in root level for Korean site.
http://www.enjoyitaewon.com

Then I made English version site in subfolder that runs joomla 1.5
http://www.enjoyitaewon.com/seoul/

But becasue of root level Korean CMS web.config, subsite joomla is not working properly.

Someone suggested to use
<location path="." inheritInChildApplications="false">
</location>
for root level we.config to ignore root level web.config rewrite rule on other subfolder site..(joomla)

But I don't know where exactly put that lines.
<location path="." inheritInChildApplications="false">
</location>

My root level web.config is like following.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<configSections>
<sectionGroup name="system.webServer">
<sectionGroup name="rewrite">
<section name="rewriteMaps" overrideModeDefault="Allow" />
<section name="rules" overrideModeDefault="Allow" />
</sectionGroup>
</sectionGroup>
</configSections>

<system.webServer>
<defaultDocument>
<files>
<remove value="index.php" />
<add value="index.php" />
</files>
</defaultDocument>

<rewrite>
<rules>
<!--# reserve XE Layout Template Source File (*.html)-->
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^layouts/(.+)/(.+).html$" ignoreCase="false" />
<action type="Rewrite" url="./index.php" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*)" ignoreCase="false" />
<conditions>
<!--# static files-->
<add input="{SCRIPT_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./files/{R:2}/{R:3}" />
</rule>
<rule name="Imported Rule 3" stopProcessing="true">
<match url="^(w+)(/w+(/entry)?)?/(files|modules|common|widgets|widgetStyle|layouts|addons)/(.*)" ignoreCase="false" />
<conditions>
<add input="{SCRIPT_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./{R:4}/{R:5}" />
</rule>
<!--# rss , blogAPI-->
<rule name="Imported Rule 4" stopProcessing="true">
<match url="^(rss|atom)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?module=rss&amp;act={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 5" stopProcessing="true">
<match url="^(w+)/(rss|atom|api)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?mid={R:1}&amp;act={R:2}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 6" stopProcessing="true">
<match url="^(w+)/(w+)/(rss|atom|api)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&amp;mid={R:2}&amp;act={R:3}" appendQueryString="false" />
</rule>
<!--# trackback-->
<rule name="Imported Rule 7" stopProcessing="true">
<match url="^(d+)/(.+)/trackback$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?document_srl={R:1}&amp;key={R:2}&amp;act=trackback" appendQueryString="false" />
</rule>
<rule name="Imported Rule 8" stopProcessing="true">
<match url="^(w+)/(d+)/(.+)/trackback$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&amp;document_srl={R:2}&amp;key={R:3}&amp;act=trackback" appendQueryString="false" />
</rule>
<!--# administrator page-->
<rule name="Imported Rule 9" stopProcessing="true">
<match url="^admin/?$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?module=admin" appendQueryString="false" />
</rule>
<!--# document permanent link-->
<rule name="Imported Rule 10" stopProcessing="true">
<match url="^(d+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?document_srl={R:1}" appendQueryString="false" />
</rule>
<!--# vid + document permanent link-->
<rule name="Imported Rule 11" stopProcessing="true">
<match url="^(w+)/(d+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&amp;document_srl={R:2}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 12" stopProcessing="true">
<match url="^(w+)/?$" ignoreCase="false" />
<conditions>
<!--# mid link-->
<add input="{SCRIPT_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./index.php?mid={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 13" stopProcessing="true">
<match url="^(w+)/(w+)/?$" ignoreCase="false" />
<conditions>
<!--# vid + mid link-->
<add input="{SCRIPT_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./index.php?vid={R:1}&amp;mid={R:2}" appendQueryString="false" />
</rule>
<!--# mid + document link-->
<rule name="Imported Rule 14" stopProcessing="true">
<match url="^(w+)/(d+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?mid={R:1}&amp;document_srl={R:2}" appendQueryString="false" />
</rule>
<!--# vid + mid + document link-->
<rule name="Imported Rule 15" stopProcessing="true">
<match url="^(w+)/(w+)/(d+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&amp;mid={R:2}&amp;document_srl={R:3}" appendQueryString="false" />
</rule>
<!--# mid + entry title-->
<rule name="Imported Rule 16" stopProcessing="true">
<match url="^(w+)/entry/(.+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?mid={R:1}&amp;entry={R:2}" appendQueryString="false" />
</rule>
<!--# vid + mid + entry title-->
<rule name="Imported Rule 17" stopProcessing="true">
<match url="^(w+)/(w+)/entry/(.+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&amp;mid={R:2}&amp;entry={R:3}" appendQueryString="false" />
</rule>
</rules>
</rewrite>

</system.webServer>
<system.net>
<mailSettings>
<smtp from="">
<network host="" />
</smtp>
</mailSettings>
</system.net>

</configuration>

Is there other mathod to solve this issue or would putting the above lines help resolving the issue?
Also where to put those lines?

I greatly appreciate any help or tip on resolving this issue.

Thank you very much for your kindness and time!
:p

Post By: | 09-20-2012 00:41

Solved!
Thanks to http://runtingsproper.blog spot.com/2010 ... onfig.html

Running IIS7 or above?

The newer versions of IIS have moved their configuration settings to a new section. If you have a web.config that is for IIS7 then you will need to also wrap <system.webServer> which is further down.
?
1
2
3
4
5

<location path="." inheritInChildApplications="false">
<system.webServer>
<!-- ... -->
</system.webServer>
</location>

`Reply Or Comment!
Please LogIn to Reply!