Copied to clipboard

Flag this post as spam?

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


  • Jonas 49 posts 21 karma points
    Apr 02, 2009 @ 10:56
    Jonas
    0

    Better URL (hide folder name)

    I have a question about of the URL's of a site. We like to have this structure in the content-tree-view:

    [code]\content
    \oursite.com
    \public area
    \publicfolder1...
    \member area
    \memberfolder1...[/code]

    However that will create urls looking like this:

    [quote]http://oursite.com/publicarea/publicfolder1.aspx[/quote]

    It would be nice to have the public area urls like this:

    [quote]http://oursite.com/publicfolder1[/quote]

    But the member area url's should include the folder name, like this:

    [quote]http://oursite.com/memberarea/memberfolder1[/quote]

    Can we hide the /publicarea/-part of the address without rearranging the content tree?

    (I've will try to configure "flat url's" to get rid of the .aspx.)

    Many thanks

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Apr 02, 2009 @ 11:05
    Dirk De Grave
    0

    Hi,

    Have a look at this url: http://www.netaddicts.be/blog/2009/3/8/umbraco-quick-tip-1-umbracourlalias-and-specifying-complete-new-path.aspx and see if that fits your needs.

    Regards,
    /Dirk

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 02, 2009 @ 11:09
    Douglas Robar
    1

    There are a couple options but I suspect they are all more work than they are worth.

    The easiest solution is to simply move the publicarea content under the oursite.com section, leaving the memberarea folder for content specifically for the members. That way your content tree and your urls are in sync and everything will "just work".

    Otherwise, you'll have to do a bit of extra work. Others may have other approaches but I think I'd use a url-rewrite rule to simplify the url, add an umbracoUrlAlias property to the docTypes and put the shortened url for each node in there (so umbraco can resolve the shortened url), and use a macro to insert links that similarly removes the /publicarea part of the url from the umbraco.library:NiceUrl() function rather than inserting links directly.

    You could even create an event handler to auto-populate the umbracoUrlAlias property when a content node is published since you've got such a clear algorithm.

    Still, the simple thing is to just restructure your content nodes. Doing so will also mean one less click to expand the tree every time you want to edit a page.

    cheers,
    doug.

  • Jonas 49 posts 21 karma points
    Apr 02, 2009 @ 12:14
    Jonas
    0

    Thank you both for your very quick and instructive answers!

    The 'umbracoUrlAlias'-property was good news, and I tried it - it works rather well on our test-site at the moment.

    To see if I understood it correct: you said that the child nodes should automatically follow their parents alias, no? Then I should not need a event handler to fill every child nodes alias, correct?

    However - the \public\ folder should really alias up to the root, how do I accomplish that with 'umbracoUrlAlias'? Should I only enter '\' or '~' for the \public\ node? Or is it impossible, and I will need to set the 'umbracoUrlAlias' on all the child nodes on the level under publicarea (easy enough).

    And yes, simplicity is good. So, moving up the publicarea content one level is perhaps what I will end up doing anyway. However for another issue I will definitely use the umbracoUrlAlias.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Apr 02, 2009 @ 14:04
    Dirk De Grave
    0

    Hi,

    I'm afraid it's not possible to use '\' or '~' although I haven't test that. An empty umbracoUrlAlias will make no sense either. Guess you'll have to use the approach you've outlined.

    Regards,
    /Dirk

  • Adin 11 posts 31 karma points
    Dec 30, 2010 @ 12:17
    Adin
    0

    Hi,

    I had my domain on the root of my Godaddy hosting account. I had to move it to child folder.
    Before my urls looked like this "http://www.mydomain.com/desiredlink"
    Now they look like this "http://www.mydomain.com/folder/desiredlink". My problem is that name of folder shows up in url.
    I tried umbracoUrlAlias and it doesn't work for me. I would like to permanently redirect those links to my original url model.
    I tried to do that in UrlRewriting.net but I didn't know how. I am always missing something.

    I am using .net 4 and umbrace release not older than few weeks.
    Any ideas, please? Can someone give me url rewriting rules which would solve this?

  • Kim Andersen 1447 posts 2197 karma points MVP
    Dec 30, 2010 @ 13:08
    Kim Andersen
    0

    Hi Adin

    Could you show us how your nodes in the content section are structured?

    If you moved the umbraco files to a subfolder in your GoDaddy file system, it sounds to me more like a DNS issue than an umbraco related issue. Maybe you should set the domain.com up to point at the folder, instead of the root.

    /Kim A

  • Adin 11 posts 31 karma points
    Jan 03, 2011 @ 02:11
    Adin
    0

    My parent node is my master page and i used web.config to hide that in url. Children of master node are my pages. I don't have multilingual site so it's very simple. My domain points to this folder. I know that because i tried to upload dummy html file (index.html) and i can see it as domain.com/index.html.

    I can see my pages like that as well http://www.mydomain.com/desiredlink but only when i type it directly in browser. Menu control and landing page by default return urls with folder name. (http://www.domain.com/folder/home)

    I tried url rewriting but it doesn't work since i create circular rules and i don't know how to do that better. I moved this page from another hosting, where site was on root, and now i have SEO issues since i have completely different urls.

    Any advice?

    Thanx

Please Sign in or register to post replies

Write your reply to:

Draft