tryandcatch.net

Blogs from tryandcatch.net
Welcome to tryandcatch.net Sign in | Join | Help
in Search

Ezequiel EspĂ­ndola's Blog

Multiple Community Server blogs at the root of their own subdomain

As promised on my first and last post: http://blogs.tryandcatch.net/eespindola/archive/2005/05/04/blogging_with_community_server.aspx, here I describe what I did to make Community Server work for multiple blogs at the root.

I wanted blogs to have their own subdomain without the need for a blogs folder. So the Url would be like http://blogs.tryandcatch.net/eespindola instead of http://blogs.tryandcatch.net/blogs/eespindola.

First I installed Community Server and made sure it was working for the domains I wanted it to work: http://blogs.tryandcatch.net and http://weblogs.tryandcatch.net. If you are wondering how to do it yourself, you will need to point the subdomains to the folder where you installed the application, and then run the stored procedure cs_System_AddNewUrl by specifying the current Url and the new one to let Community Server know it has to work on both.

Once that was set up, I moved all files from the blogs folder to the root avoiding to overwrite the Web.config. Then I changed settings of two configuration files: Web.config and SiteUrls.config. And that was it!

On the Web.config file I removed all places on the <httpHandlers> element where it said "blogs/". So for example:

   <add path="blogs/ShortLink.aspx" verb="*" type="CommunityServer.Blogs.Components.ShortLink, CommunityServer.Blogs" />

became

   <add path="ShortLink.aspx" verb="*" type="CommunityServer.Blogs.Components.ShortLink, CommunityServer.Blogs" />

On the the SiteUrls.config file I had to make more changes as this is the file used to specify how Urls are treated by the application. First I changed the "weblogs" location from "/blogs/" to "/", so

   <location name="weblogs" path="/blogs/" />

became

   <location name="weblogs" path="/" />

That tells Community Server to search for the blog application files at the root. The file is mainly used for Url ReWriting so you have to make sure the application doesn't get confused on when to redirect your Urls and when not to do it. On the <locations> element you are able to specify links that have to be excluded from the Url ReWriting logic, so to have the blog files working at the root and don't break the Admin, I had to change the "admin" location by adding the exclude="true" attribute:

   <location name="admin" path="/admin/" exclude="true" />

The Themes and Messages Urls get mixed up on the Url ReWriting logic also, so I had to add a new line to exclude the Themes folder:

   <location name="themes" path="/Themes/" exclude="true" />

And one more to specify what the location to the Messages logic was, changing the location under the <urls> element also:

   <location name="messages" path="/Msgs/" />
   <url name="message" location="messages" path="default.aspx?MessageID={0}" />

This is all you have to do to make Community Server work for multiple weblogs at the root of their own subdomain. So far it works, but I know there are probably some stuff that doesn't. If you find some please leave a comment or contact me.

Next I would like to investigate a little about skinning because there are some links that are still pointing to the wrong "blogs" location. I deleted the home page because I didn't liked it, but also because it had that problem.

I have disabled Forums and Galleries too. I might be adding them up later.

Published Saturday, May 07, 2005 10:13 PM by eespindola
Filed Under:
Anonymous comments are disabled

This Blog

Post Calendar

<May 2005>
SuMoTuWeThFrSa
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

Syndication

Powered by Community Server, by Telligent Systems