Instead of mydomain.com/reader/Default.aspx?id=12345&type=book I could enable links like mydomain.com/reader/Default.aspx/12345/book.
Here's how I enabled this using Web.config:
<configuration>
<!--...-->
<configSections>
<!--...-->
<!-- For URLRewriter -->
<section
name="rewriter"
requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.
RewriterConfigurationSectionHandler,
Intelligencia.UrlRewriter" />
</configSections>
<system.web>
<!--...-->
<httpModules>
<add
name="UrlRewriter"
type="Intelligencia.UrlRewriter.RewriterHttpModule,
Intelligencia.UrlRewriter"/>
</httpModules>
</system.web>
<rewriter>
<rewrite
url="~/reader/Default.aspx/(.*)/(.*)/$"
to="~/reader/Default.aspx?id=$1&type=$2" />
<rewrite
url="~/reader/Default.aspx/(.*)/(.*)$"
to="~/reader/Default.aspx?id=$1&type=$2" />
</rewriter>
</configuration>
No comments:
Post a Comment