0

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>  
5
  • Provide more info, we can't guess what the problem is...
    – leppie
    Nov 12, 2010 at 5:30
  • What's the behavior you're seeing? Are you running on IIS both times or are you using the development server locally?
    – Josh M.
    Nov 12, 2010 at 5:36
  • And the error/exception you are getting? What OS is the internet version running on?
    – leppie
    Nov 12, 2010 at 5:36
  • no error (just error 404 page not found) it just not working I test it on IIS7 in my computer it is working but it is not the case on the internet
    – Kiarash
    Nov 12, 2010 at 5:37
  • @Kiarash: Make sure the AppPool runs under Integrated mode.
    – leppie
    Nov 12, 2010 at 7:20

1 Answer 1

2

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.