Turn off a Child Portal in DNN (DotNetNuke)

Sometimes you may have a need to turn off a child portal for sometime without using the expiration date host setting.

There is an easy way to do it with IIS’s URLRewrite module.

Here is an example code in web.config file:

<system.webServer>

….

<rewrite>

<rules>

<rule name=”RedirectChildPortal” stopProcessing=”true”>

<match url=”^myChildPortal/$” />

<conditions>

<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />

</conditions>

<action type=”Redirect” url=”SomePage.htm” />

</rule>

</rules>

</rewrite>

</system.webServer>

<system.web>

…..


Redirect domain site root to another page with URLRewrite (IIS7)

There are two ways I know to do this:

1.Method1:

<rule name=”Redirect1_For_http://mysite.com/” stopProcessing=”true”>

<match url=”^\d*$” negate=”false” />

<action type=”Redirect” url=”redirect.aspx” />

</rule>

 

2. Method 2:

<rule name=”RedirectRootToAnotherPage” enabled=”true” stopProcessing=”true”>

<match url=”^$” />

<action type=”Redirect” url=”http://mysite.com/redirect.aspx&#8221; logRewrittenUrl=”true” />

</rule>

Read the rest of this entry »