Copied to clipboard

Flag this post as spam?

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


  • Accusoft 58 posts 109 karma points
    Jul 06, 2011 @ 16:59
    Accusoft
    0

    2nd Level Nav without 1st Level in URL

    First off, I apologize if this isn't the right forum for this question.  I was trying to match it to the topic as best I could.

    I have a standard site with a sitemap that looks similar to the following:

    Programs
    Program 1
    Program 2
    Company
    Bios
    Contact

    The URLs for programs and company would be programs.aspx and company.aspex respectively.  The sub-navigation looks like programs/program-1.aspx, programs/program-2.aspx, company/bios.aspx, etc.

    This is exactly what I expect and want for those particular items.

    However, I'm going to add a new navigation called Solutions that will have sub-navigation:

    Solutions
    Solution 1
    Solution 2

    I do NOT want the URLs to use the solutions main navigation in their URL.  I want the URL to go directly to solutions-1.aspx and solutions-2.aspx without a redirect.  

    How can I accomplish this and still maintain the previous structure?

    Thanks in advance for your help!!

     

  • David Dupont 61 posts 115 karma points
    Jul 08, 2011 @ 17:29
    David Dupont
    0

    Best way to do it is to add some rewriting rules in the file /config/UrlRewrite.config
    To automaticaly rewrite Url like :

    /Solution 1.aspx

    to

    /Solution/Solution 1.aspx

    When the request will arrive in the umbraco pipe it will be automatically redirected to the coresponding page.

    Check that site for more explanations about .NET rewriting :

    http://www.urlrewriting.net/149/en/home.html

     

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 08, 2011 @ 17:36
    Dirk De Grave
    0

    Or use umbracoUrlAlias property and set it to "solution-1"

     

    Cheers,

    /Dirk

  • Accusoft 58 posts 109 karma points
    Jul 14, 2011 @ 16:45
    Accusoft
    0

    solution-1 doesn't seem to work but this is the route I would prefer to go instead of writing rules for each of them.  Any thoughts?

  • 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