Exact additional URL for Blog URLs

Posted by Community Admin on 03-Aug-2018 19:52

Exact additional URL for Blog URLs

All Replies

Posted by Community Admin on 11-Nov-2011 00:00

We are migrating over a site and trying to set up redirects for the old URLs on the previous website.

For almost all of the pages on the site, we have simply added the old URL to the additional URL section, and this has worked previously.

However, when we add additional URLs to a blog post, the behavior is different.. it is adding /blog/ at the beginning of the additional urls that we add, so the URL from the old website becomes non-functional.

For example:

Old site has a URL of eaglesflight.com/.../post123

We add an additional URL of: ~/cms/post123/

But SiteFinity is making the URL: eaglesflight.com/.../

Thus, the additional URLs do not work. What should we do?

Posted by Community Admin on 16-Nov-2011 00:00

Hello Jacob,

Thank you for contacting us.

Sitefinity adds /Blogs before each blog post because the providers is configured like that. To change it go to Administration->Settings->Advanced->Blogs->Providers->OpenAccessDataProvider->application name and change it to be different than blogs so it can match the old url. Restart the application after making the change.

I hope this will help you.

Greetings,
Stanislav Velikov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 16-Nov-2011 00:00

Thanks, Stanislav, but when we do this, all of our blog posts now appear to be missing..

Please advise?

Posted by Community Admin on 21-Nov-2011 00:00

Hello Jacob,

Excuse me I have misled you. The url generated for blogs is /root_site_name/pageName/BlogName/2011/11/21/postName. I suppose /blog is the name of the page where the blogs widget is placed.
The url for "multiple url" should be " /cms/post123/ ". If you need the url to redirect back to the url of the Sitefinity 4 blog there is a checkbox "All additional URLs redirect to the default one:" under multiple url textbox.
Can you share with me the settings you have for multiple urls and what is the desired functionality if I have misunderstood your request?

The changed settings are reflected in configurations. Go to App_Data/Sitefinity/Configuration/BlogsConfig and change the provider name back to /Blogs.

Greetings,
Stanislav Velikov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 19-Jan-2012 00:00

Stanislav,

Using your example of how the blog post urls get generated I want to remove the "BlogName" from it. The site i am working with has a single blog in the Blogs module and has a /blog page to display the posts along with /blog/post to display the individual posts (different template than the lists page). I have set the correct pages on my blogposts widgets and set the default page for the blog to the /blog page however the url that gets generated is /blog/post/blog/2011/etc... The extra /blog/ is redundant. I have looked for the additional URL's checkbox in the Administration->Settings->Advanced->Blogs and I could not find it.  Am I missing something that is needed to remove the BlogName?

Posted by Community Admin on 19-Jan-2012 00:00

Conrad,
The blogsprovider by default adds the blog's url to the post so that it ensures a unique url in the case that you are using multiple blogs.

It is possible to override this behavior, however it does involve creating a new class. Fortunately the process is pretty simple, and is outlined in this post: Custom URL Formats for Sitefinity Content Modules

In that example, they add an additional provider for the new blog format, however you can also simply replace the type of the existing provider to be the custom one you create.

I hope this is helpful! let me know if you have any questions or encounter any issues!

Posted by Community Admin on 20-Jan-2012 00:00

Works perfectly. Thanks for the excellent link!

This thread is closed