With MCMS2002 you have Channels and Postings; a Channell contains one or more Postings. A Channel has a default Posting which is being displayed when you request the Channelname in the browser.
Example; Channel /ETV/Utrecht/ (http://www.etv.nl/ETV/Utrecht) is the homepage for the Utrecht “Venster” of ETV. It will display the Posting /ETV/Utrecht/Utrecht.htm as this is set as default Posting.
Now, both http://www.etv.nl/ETV/Utrecht and http://www.etv.nl/ETV/Utrecht/Utrecht.htm will show exactly the same content. When analyzing the Pages report in WebTrends, both URL’s will occur:
Now this is not an ideal situation because you just want totals without having to pick your calculator. These were two options I figured out;
1. Use WebTrends’ URL Search/Replace
For every Channel you have to make a definition that adds the name of the Posting to the Channel URL. So it rebuilds the records in the logfile from http://www.etv.nl/ETV/Utrecht/ to http://www.etv.nl/ETV/Utrecht/Utrecht.htm. The disadvantage is that we have a lot of Channels in this site. Every time a Channel has been made or has been changed, you will have to add a new URL Search/Replace definition or change it.
2. Use Script URL in Microsoft Content Management Server 2002
Redirect all traffic initially destined for a Channel to the Posting-url. You can do this with the “Script URL” property of a Channel. In this field you specify the URL of a redirectpage, the redirectpage handles the request and forwards it to the Posting-URL.
The disadvantage is that you are introducing a redirect in your site and redirects are a no-no for search engines. To decrease most of the negative points, we use a 301 Moved Permanently redirect instead of the 302 you’d use when you do a Response.Redirect;
private void Page_Load(object sender, System.EventArgs e) As final touch we add a filter to the WebTrends report to exclude all hits with errorcode 301 and the job is done. With little amount of work we built a generic solution for proper Page reports.
{
Channel currentChannel = CmsHttpContext.Current.Channel;
string defaultPosting = currentChannel.DefaultPostingName;
if (defaultPosting != “”)
{
if (currentChannel.Postings[defaultPosting] != null)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(“Location”,currentChannel.Postings[defaultPosting].Url);
}
}
}
www.omtrends.com