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

Forums / Developing with Sitefinity / URL Rewrites Causing 404

URL Rewrites Causing 404

8 posts, 0 answered
  1. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    20 May 2011
    Link to this post
    Hi guys,
    I'm trying to follow this tutorial for rewriting pages with parameters to something user friendly in 3.7sp4:

    http://learn.iis.net/page.aspx/497/user-friendly-url---rule-template/

    The rewrites work with a blank project, but as soon as I try in SF, whilst the url is rewritten, the content comes back as a 404.  If I add the article.aspx page to the root of my SF build and try there it also works, but doing it to a page managed by SF returns the 404.

    Can you please help?  Should I be doing this using your own rewrite rules rather than IIS?  If so, what's the process?

    The end result we're looking for is to rewrite

    ~/products?id=1234&title=exampleTitle

    to

    ~/products/1234/exampleTitle

    Thanks in advance,
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    30 Nov 2016
    24 May 2011
    Link to this post
    Hello JAllen,

    Please refer to this video and also visit the website mentioned in the video. This is the best way to use url Rewrite in Sitefinity 3.x.

    I hope this information helps.

    Kind regards,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    25 May 2011
    Link to this post
    Hi Stanislav,
    I've managed to get the rewrite working locally, but as as soon as I get it on a server going through IIS, they stop working.  Even going through IIS locally keeps it from working - continue to get the 404.  Is there something I'm missing - something I have to set up in IIS or something?

    Also, is there any reason why SF would keep the standard IIS rewrites from working? Becaus I can't get them to work either.

    Thanks for your help
  4. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    25 May 2011
    Link to this post
    I've found another thread that's very simlar, so posted there hoping rck (user who had similar problems) found a solution, but it doesn't apppear he ever did.

    http://www.sitefinity.com/devnet/forums/sitefinity-3-x/general-discussions/rewrite.aspx#1659713

    If you have any other ideas, please post there for both our sakes.

    Thanks,
  5. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    30 Nov 2016
    25 May 2011
    Link to this post
    Hello JAllen,

    Please refer to this thread.

    All the best,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    25 May 2011
    Link to this post
    Hi Stanislav,
    Sorry, is that the right link?  The resolution was the following lines in <system.webServer>:

        <httpErrors errorMode="Detailed"/>
        <asp scriptErrorSentToBrowser="true"/>   

    ... and they don't help me any - I get exactly the same problem and exaclty the same error (attached).  Are you implying that my same issue has been resolved for someone else?  If so, I'm not seeing it anywhere.

    Thanks,
  7. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    26 May 2011
    Link to this post
    I've found the solution myself.  Gabe's video is fairly old and must not be compatable with IIS7.  He references making a change from CmsHttpModule to CmsHttpModuleUrlRewrite in this section:

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

    but it appears in IIS7 this doesn't work.  Ivan's post here: http://www.sitefinity.com/devnet/forums/sitefinity-3-x/general-discussions/url-rewriting-only-works-locally.aspx#1481120 made me realize this is incorrect for IIS7 and once I added it to this section, it works:

    <system.webServer>
     <modules>
    <add name="Cms" type="Telerik.Cms.Web.CmsHttpModuleUrlRewrite, Telerik.Cms"/>
     </modules>
    </system.webServer>
  8. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    30 Nov 2016
    27 May 2011
    Link to this post
    Hello JAllen,

    Thank you for sharing this information with the community so other may benefit.

    Best wishes,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
8 posts, 0 answered