Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Marc Love (uSkinned.net) 349 posts 946 karma points
    May 28, 2010 @ 11:34
    Marc Love (uSkinned.net)
    0

    aspx page outwith umbraco redirect problem

    Hi,

    I have a aspx page on my umbraco website that sits in a folder seperate from umbraco. How do I hit this page without umbraco looking for it as an umbraco page?

    At the moment I get the following error when I try to do this:

    Page not found

    No umbraco document matches the url 'http://sfd.local/custompages/newsdetail.aspx'

    Cheers,

    Marc

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    May 28, 2010 @ 11:36
    Sebastiaan Janssen
    0

    In you web.config add the page to the "umbracoReservedUrls" key.

  • Marc Love (uSkinned.net) 349 posts 946 karma points
    May 28, 2010 @ 11:48
    Marc Love (uSkinned.net)
    0

    Perfect, thanks.

    If I wanted to change this so that I had a page like:

    /news/this-is-my-news-title-101.aspx

    and wanted to redirect to:

    /custompages/newsdetail.aspx?id=101

    Do you know how I would achieve this?

    Cheers,

  • Masood Afzal 176 posts 522 karma points
    May 28, 2010 @ 12:02
    Masood Afzal
    0
  • Masood Afzal 176 posts 522 karma points
    May 28, 2010 @ 12:06
    Masood Afzal
    0

     may be Url Rewriting?

  • Marc Love (uSkinned.net) 349 posts 946 karma points
    May 28, 2010 @ 12:08
    Marc Love (uSkinned.net)
    0

    Will have a look cheers

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    May 28, 2010 @ 12:09
    Sebastiaan Janssen
    0

    Well if there's always that ID at the end, you could easily do it with a rewrite rule (see /config/urlrewriting.config):

        <add name="contentstringrewrite"
          virtualUrl="^~/news/(.*)-([0-9]{1,5})(\.aspx)?"
          rewriteUrlParameter="ExcludeFromClientQueryString"
          destinationUrl="~/custompages/newsdetail.aspx?id=$2"
          ignoreCase="true" />
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies