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="HZSolutions Blogs" />
<add key="AggregateUrl" value="http://blogs.hzsolutions.com/" />
<add key="AggregateDescription" value="HZSolutions Blogs" />
<add key="AggregateHost" value="blogs.hzsolutions.com" />
Note the value of hzsolutions. Although the subtext is installed under http://blogs.hzsolutions.com/, this should be the root host.
I have 2 directories for each of my blogs under http://blogs.hzsolutions.com/these are
- http://blogs.hzsolutions.com/hung and
- http://blogs.hzsolutions.com/vnd
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>
</appSettings>
</configuration>
That is it. You can also use something like .Text's web.config for multiple blogs.