Reputation: 1919
what I done with UrlRewriting.net is just working well while Im locally testing it, it is not working on the internet why? is there any configuration? I just did what ever ScottGu said: link text
thanks inadvance
<configSections>
<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="~/products/books.html" to="~/products.aspx" />
</rewriter>
</configuration>
Upvotes: 0
Views: 1375
Reputation: 8756
Here's the important parts you'll need:
<?xml version="1.0"?>
<configuration>
<configSections>
<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>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
</modules>
<!-- THE FOLLOWING LINE MUST BE PRESENT FOR AJAX & VALIDATION TO WORK WITH URLREWRITER.NET -->
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>
<!-- URL REWRITER -->
<rewriter>
<rewrite url="^~/About$" to="~/About.aspx" />
</rewriter>
</configuration>
My suggestion would be though, if you are able to use .Net 4, use URL Routing -it's way better.
Upvotes: 2