+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Url rewrite not working

Url rewrite not working

5 posts, 1 answered
  1. Bruno Michels
    Bruno Michels avatar
    125 posts
    Registered:
    16 Apr 2010
    11 Aug 2010
    Link to this post
    I've followed the instructions here http://www.sitefinitywatch.com/blog/09-01-08/URL_Rewriting_with_Sitefinity_s_AdvancedUrlRewriter.aspx

    Setting

    <configSections>
     <sectionGroup name="telerik">
       ...
       <section name="urlrewrites" type="Telerik.Cms.Web.AdvancedUrlRewriter, Telerik.Cms"/>
       ...
     </sectionGroup>
    </configSections>

    <httpModules>
      ...
      <add name="Cms" type="Telerik.Cms.Web.CmsHttpModuleUrlRewrite, Telerik.Cms"/>
      ...
    </httpModules>

    And I saw this video http://www.sitefinity.com/devnet/webinars/url-rewriting-in-sitefinity.aspx

    And the following code is not working:

    <telerik>
      ...
      <urlrewrites>
        <rule>
          <url>Home\.aspx</url>
          <rewrite>a.aspx</rewrite>
        </rule>
      </urlrewrites>
      ...
    </telerik>

    Server Error in '/' Application.
    The resource cannot be found.
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.
     
    Requested URL: /a.aspx
     
    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927


    What's wrong?
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    11 Aug 2010
    Link to this post
    Hello Bruno Michels,

    You have added the CmsHttpModuleUrlRewrite in httpHandlers section which is for IIS 6.0. If you are using IIS 7.0 you have to add the same in system.webServer/handlers configuration section.

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Adam
    Adam avatar
    8 posts
    Registered:
    25 Oct 2010
    10 Nov 2010
    Link to this post
    Can you please provide an example for the System.Webserver/handlers for the URLRewriter in the web.config.
    I'm not sure what the verb, type, path should be in tag.
    Thanks,
    adam
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    10 Nov 2010
    Link to this post
    Hi Adam,

    I just realized there has been a typo in my previous response. The module should be configured in system.webServer/modules for IIS 7.0 not in system.webServer/handlers. See bellow:
    <modules runAllManagedModulesForAllRequests="true">
        <remove name="ScriptModule" />
        <remove name="Cms" />
        <!--<remove name="LibraryModule"/>-->
        <remove name="RadUploadModule" />
        <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add name="Cms" type="Telerik.Cms.Web.CmsHttpModuleUrlRewrite, Telerik.Cms" />
        <!-- Http Module for extension mappings in Library module.-->
        <!--<add name="LibraryModule" type="Telerik.Libraries.LibraryHttpModule, Telerik.Libraries"/>-->
        <add name="RadUploadModule" preCondition="managedHandler" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" />
    </modules>

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Adam
    Adam avatar
    8 posts
    Registered:
    25 Oct 2010
    10 Nov 2010
    Link to this post
    Radoslav,
    Thanks for the quick response.
    That did the trick. I was also having an issue when moving from one host to RackSpace (Mosso). However, it looks like it was because the old host was running in IIS6 and Mosso runs in IIS7.
    Thanks for the solution
Register for webinar
5 posts, 1 answered