I have installed Subtext for my blogging purposes but having the multiple
blogs working is a bit tricky.
I have to comment out the following handler line on the root web.config
<!--<HttpHandler
pattern="(?:((\/\/default\.aspx)?|(\/\/?))?)$" controls="homepage.ascx"/>-->
And set up the aggregation section like:
<!-- Aggregate Blog Stuff -->
<add key="AggregateEnabled" value="true" />
<add key="AggregateTitle" value="Analyst Developer Blogs" />
<add key="AggregateUrl" value="http://www.analystdeveloper.com/blogs" />
<add key="AggregateDescription" value="Blogs by Analyst Developer" />
<add key="AggregateHost" value="analystdeveloper.com" />
Note the value of AggregateHost. Although the subtext is installed under
http://www.analystdeveloper.com/blogs, this should be the root host.
I have 2 directories for each of my blogs under
http://www.analystdeveloper.com/blogs these are
- http://www.analystdeveloper.com/blogs/gurkan and
- http://www.analystdeveloper.com/blogs/gurkaneng
Each directory contains 3 files:
- default.aspx (an empty file)
- RSS2Image.gif (picture of yourself or a logo for RSS readers)
- web.config
This individual web.config file contains handlers (same as main web.config) and
some UI texts with a different encoding. We need to copy the handlers from main
web.config so that the links can go where they suppose to go.
<?xml version="1.0" encoding="unicode" ?>
<configuration>
<HandlerConfiguration defaultPageLocation="DTP.aspx"
type="Subtext.Common.UrlManager.HandlerConfiguration, Subtext.Common">
<HttpHandlers>
<HttpHandler pattern="/login.aspx" handlerType="Page" pageLocation="Login.aspx"
/>
<HttpHandler pattern="/Admin/" handlerType="Directory" directoryLocation="Admin"
/>
<HttpHandler pattern="/rss\.aspx$" type="Subtext.Common.Syndication.RssHandler,
Subtext.Common" handlerType="Direct" />
<HttpHandler pattern="/atom\.aspx$" type =
"Subtext.Common.Syndication.AtomHandler, Subtext.Common" handlerType="Direct" />
<HttpHandler pattern="/comments/commentRss/\d+\.aspx$" type =
"Subtext.Common.Syndication.RssCommentHandler, Subtext.Common"
handlerType="Direct" />
<HttpHandler pattern="/aggbug/\d+\.aspx$" type =
"Subtext.Framework.Tracking.AggBugHandler, Subtext.Framework"
handlerType="Direct" />
<HttpHandler pattern="/customcss\.aspx$" type =
"Subtext.Web.UI.Handlers.BlogSecondaryCssHandler, Subtext.Web"
handlerType="Direct" />
<HttpHandler pattern="(?:/category\/(\d|\w|\s)+\.aspx/rss/?)$" type =
"Subtext.Common.Syndication.RssCategoryHandler, Subtext.Common"
handlerType="Direct" />
<HttpHandler pattern="(?:/archives\.aspx)$" controls="SingleColumn.ascx" />
<HttpHandler pattern="(?:/archive/\d{4}/\d{2}/\d{2}/\d+\.aspx)$"
controls="viewpost.ascx,Comments.ascx,PostComment.ascx" />
<HttpHandler pattern="(?:/archive/\d{4}/\d{2}/\d{2}/[-_,+\.\w]+\.aspx)$"
controls="viewpost.ascx,Comments.ascx,PostComment.ascx" />
<HttpHandler pattern="(?:/archive/\d{4}/\d{1,2}/\d{1,2}\.aspx)$"
controls="ArchiveDay.ascx" />
<HttpHandler pattern="(?:/archive/\d{4}/\d{1,2}\.aspx)$"
controls="ArchiveMonth.ascx" />
<HttpHandler pattern="(?:/articles/\d+\.aspx)$"
controls="viewpost.ascx,Comments.ascx,PostComment.ascx" />
<HttpHandler pattern="(?:/articles/[-_,+\.\w]+\.aspx)$"
controls="viewpost.ascx,Comments.ascx,PostComment.ascx" />
<HttpHandler pattern="(?:/contact\.aspx)$" controls="Contact.ascx" />
<HttpHandler pattern="(?:/posts/|/story/|/archive/)"
type="Subtext.Web.UI.Handlers.RedirectHandler, Subtext.Web" handlerType="Direct"
/>
<HttpHandler pattern="(?:/gallery\/\d+\.aspx)$"
controls="GalleryThumbNailViewer.ascx" />
<HttpHandler pattern="(?:/gallery\/image\/\d+\.aspx)$"
controls="ViewPicture.ascx" />
<HttpHandler pattern="(?:/(?:category|stories)/(\w|\s)+\.aspx)$"
controls="CategoryEntryList.ascx" />
<HttpHandler pattern="(?:/comments\/\d+\.aspx)$" type =
"Subtext.Common.Syndication.CommentHandler, Subtext.Common" handlerType="Direct"
/>
<HttpHandler pattern="(?:/services\/trackbacks/\d+\.aspx)$" type =
"Subtext.Framework.Tracking.TrackBackHandler, Subtext.Framework"
handlerType="Direct" />
<HttpHandler pattern="(?:/services\/pingback\.aspx)$" type =
"Subtext.Framework.Tracking.PingBackService, Subtext.Framework"
handlerType="Direct" />
<HttpHandler pattern="(?:/services\/metablogapi\.aspx)$" type =
"Subtext.Framework.XmlRpc.MetaWeblog, Subtext.Framework" handlerType="Direct" />
<HttpHandler pattern="(?:((\/\/default\.aspx)?|(\/\/?))?)$"
controls="homepage.ascx"/>
</HttpHandlers>
</HandlerConfiguration>
<appSettings>
<!--UI Text -->
<add key="PostCollection" value="Kategoriler" />
<add key="ArticleCollection" value="Köse Yazilari" />
<add key="ImageCollection" value="Resim Galerisi" />
<add key="Archives" value="Arsivler" />
</appSettings>
</configuration>
That is it. You can also use something like .Text's web.config for multiple
blogs. But I needed to change the UI Texts for my Turkish blog so I have
implemented like this.