SiteUrls.config for blog only site

There's a lot of info about how to host CS so you have only a single blog and gallery at the top level.  In fact, CS 2007 has a great feature where you can override the default settings in siteurls.config without the file itself. Scott Watermasysk has provided the siteurls_override.config and communityserver_override.config needed to host one blog at the top level. For this current site I wanted to host multiple blogs at the top level.  So I took the default that Scott provided and removed two lines.  The important thing is to know which two lines to remove.  Here's what creates a single blog at top level site:

<?xml version="1.0" encoding="utf-8" ?>
<Overrides>
   <Override xpath = "/SiteUrls/locations/location[@name='weblogs']" mode = "change" name = "path" value = "/" />
    <Override xpath = "/SiteUrls/locations/location[@name='weblogs']" mode = "new" name = "physicalPath" value = "/blogs/" />
</Overrides> 

This is the first line removed:

<Override xpath="/SiteUrls/transformers/add[@key='##blogdirectory##']" mode = "change" name = "value" value = "" />

It changes the transformer named ##blogdirectory## so it doesn't do anything.  The default for this is to add the blog path to the value being transformed.  For a single blog at the root, this is what you want.  Without this line the path to the blog would contain things like 'jeffesp'.  Obviously this is behavior that I needed, so I removed it.

The second line removed:

<Override xpath = "/SiteUrls/locations/location[@name='weblogs']" mode = "change" 
   name = "type" value = "CommunityServer.Blogs.Components.SingleBlogLocation, CommunityServer.Blogs" />

This changes the url rewriter for the blog location.  Instead of doing looking up the blog and figuring out the url from there, all the SingleBlogLocation url rewriter does is grab the ApplicationKey for the blog and insert it in the path between the site base path and whatever blog page is being requested.  An example will make this clearer:

If I were to request http://blogs.atgi.com/default.aspx and my blog application key is jeffesp, with this override in place, the request would come across (to the rest of the CS system) as http://blogs.atgi.com/jeffesp/default.aspx because jeffesp would be added to it.

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  

Enter the numbers above:
Add Comment