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

Forums / Developing with Sitefinity / Creating a directory level URL

Creating a directory level URL

5 posts, 0 answered
  1. Chris
    Chris avatar
    8 posts
    Registered:
    05 Dec 2008
    29 Dec 2008
    Link to this post
    I've looked around on forums for this answer, but haven't found it so posting here.

    I understand how to create a redirect URL through the properties tab when creating a page, so I'm fine there. But what I'd like to know is if there is a way to create a directory level URL like:

    www.vtcus.com/report

    with no .aspx.

    How would I do that?

    Thanks in advance for your insights.
  2. Parvan
    Parvan avatar
    151 posts
    Registered:
    24 Sep 2012
    30 Dec 2008
    Link to this post
    Hello Chris,

    Thank you for contacting us.

    Yes, this is possible. Please refer to the Extensionless URLs topic in User Manual http://www.sitefinity.com/documents/UserManual_3_5.pdf.

    There are several ways to add directory level url:
    1. You can use Page Group(structure your pages hierarchically) in Pages->Site Map tab
    2. You can add new URL through the properties tab of page. For example you can set given page url to be
    ~/reports and set it as a default url. 

    Hope that this information will help you.

    All the best,
    Parvan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    30 Dec 2008
    Link to this post
    if you want to correctly mimic the directory level url, I've found the best way is to create a page group for the directory, then a default.aspx beneath it and make it the first child. that way if people go to

    vtcus.com/report

    they will correctly be directed to vtcus.com/report/default.aspx.

    however, this will change the url to the latter since they are being redirected...

    If you want the url to stay as a directory, then you'd have to make the "home" page for the directory be the page itself. in otherwords instead of report.aspx being a Page Group, it's just a page.

    setting the extentionless urls will make it work as expected, however, it's not correctly implementing the directory, because users will technically be visiting vtcus.com/report.aspx, and not vtcus.com/report.

    the method you chose will likely depend on if the directory level url will have subfiles in it. I personally like to keep the format as if it were a real subdirectory. Even though the end users will ultimately be redirected to site.com/folder/default.aspx, they really only have to enter site.com/folder and that's all they have to remember because either way works, and it remains consistent with the correct structure of the site.

    anyway it's just a suggestion based on my experience. I hope that this was helpful in some way.
  4. Chris
    Chris avatar
    8 posts
    Registered:
    05 Dec 2008
    30 Dec 2008
    Link to this post
    SelArom-
    Thanks for this great feedback. So, to clarify, I don't need to make any changes with IIS to use your method? Is that correct?
  5. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    30 Dec 2008
    Link to this post
    whichever way you go, in order to transform a directory into a page, you still have to map the extensionless urls in IIS because sitefinity is expecting /page.aspx and not just /page. the options are only to help you organize the structure of the site...

    I hope that makes sense
Register for webinar
5 posts, 0 answered