Turn off a Child Portal in DNN (DotNetNuke)
Posted: June 2, 2011 Filed under: DotNetNuke (DNN), IIS 7 URLRewrite 1 CommentSometimes 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)
Posted: March 11, 2011 Filed under: IIS 7 URLRewrite Leave a commentThere are two ways I know to do this:
1.Method1:
<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” logRewrittenUrl=”true” />
</rule>