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

Forums / Developing with Sitefinity / Format Blog URL

Format Blog URL

6 posts, 0 answered
  1. Garth
    Garth avatar
    7 posts
    Registered:
    13 May 2009
    18 Jun 2009
    Link to this post
    Is there a way to format the URL for the details post?

    Particularily, I am looking to strip the date (e.g. /09-06-18/) fromt he URL.

    Thanks!
    G!
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    18 Jun 2009
    Link to this post
    Hi Garth,

    Yes, this is completely possible. Sitefinity is well optimized for SEO purposes and making the URLs as friendly as possible.
    Please open the web.config file and locate the following code:
    <cmsEngine defaultProvider="Generic_Content"
          <providers> 
            <clear/> 
            ... 
            <add name="Blogs"
     urlRewriteFormat
    ="Publication_Date]/[Title].aspx"
     
    urlDateTimeFormat="yy-MM-dd" ... 

    Note the urlRewriteFormat property. If you set it to [Title] only for example, then only the Title field will form the url of the blog posts.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Garth
    Garth avatar
    7 posts
    Registered:
    13 May 2009
    18 Jun 2009
    Link to this post
    Hi Georgi,

    Thanks for this! It will work for me for the time being, but, if I am not mistaken this will make the change site wide... there is no way to set this per blog?

    Garth!

  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    19 Jun 2009
    Link to this post
    Hello Garth,

    Yes, this will work for the global blog module. Unfortunately there is still no way to have a different UrlRewriteFormat for the different blogs.
    There is actually a trick you might try - add a different blog provider. The provider itself could have a different UrlRewriteFormat. Please check the User Manual -> Working with Modules -> Customizing modules -> Adding additional provider. Then you can separate the different blogs in different providers.

    I hope this helps!

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Terry Smith
    Terry Smith avatar
    3 posts
    Registered:
    28 Aug 2009
    02 Sep 2009
    Link to this post
    Hi,

    I'm trying to make my Sitefinity blog URLs match an existing blog so that my links are not broken when I roll out the new Sitefinity site.

    First, I need the archived post to have dates like .../2009/09/... in the URL. I've set urlDateTimeFormat="yyyy/MM" but the links are generating with .../2009_09/... Is there anything else I can try?

    Second, my blog is at /blog/Default.aspx and all the archives are generating URLs of the form /blog/default/.... How can I get rid of the /default/? My goal is a url of the form .../blog/2009/09/page-title.aspx.

    Third, my existing blog is FTP'd to my site using blogger and the extensions end in .html. I'm planning to do a permanent redirect in Globl.asax and change all "*/blog/* URLs to have an .aspx extension. Do you agree that this should work?

    Thank you!
    Terry
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    02 Sep 2009
    Link to this post
    Hello Terry Smith,

    The slash from the date format is replaced with underscore. If we add a slash this will mislead the parser and you will get 404 error.

    For the second request - Have you set ArchivePageUrl property of BlogsArchive control? This property should point to a page where you have dropped BlogPosts control.

    For the third request - it is better if you create IHttpModule and redirect the posts under BeginRequest.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered