More in this section

Forums / Developing with Sitefinity / Blog URL Rewriting

Blog URL Rewriting

3 posts, 0 answered
  1. Jodie
    Jodie avatar
    59 posts
    Registered:
    09 Oct 2012
    11 Mar 2010
    Link to this post
    Hello again all,

    I am currently working with the blog in SF 3.7 SP2. What I would like to do is rewrite the urls for the categories and the archives.

    Currently the category url looks like this: blog.aspx?BlogCatID=General+Health+%26+News
    However I want it to look like this: blog/General+Health+News

    I have written my own custom category control based on the post I made here. I have also followed this article however if I change the URLrewrite for the blog it then doesn't url rewrite the article URL and if I add a new rule for blogs I get an error as I imagine you can't have 2 rewrite rules for the same item.

    I would also like to have rewritten the archive URL which currently renders like this: Archives.aspx?Year=2010&Month=3
    To this: Archives/March-2010.aspx

    How might I achieve this?

    Any help is appreciated.

    Thanks

    Jodie
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Mar 2010
    Link to this post
    Hi Jodie,

    You can use the built-in AdvancedUrlRewrite service, but since each post has different link you are not able to cover all cases. As you can see we use QueryString to figure out which item / items you want to display. In the way you would like to see the items the application will not be able to determine whether this is a request for a content item or for a page.

    Archives.aspx?Year=2010&Month=3 - default value where the control reads the query string. The archive control generated the node url in BindHierarchicalArchive method.

    Archives/March-2010.aspx - this could be also a page from the CMS SiteMap.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Jodie
    Jodie avatar
    59 posts
    Registered:
    09 Oct 2012
    11 Mar 2010
    Link to this post
    Hi Ivan,

    Thanks for your response. Mmmmm I see what you mean, I'll have a look at the AdvancedUrlRewrite service for the blog category scenario.

    Thanks again

    Jodie
Register for webinar
3 posts, 0 answered