redirect CS 2.1 root forum urls to CS 2008.5 forum urls.

rated by 0 users
Answered (Verified) This post has 1 verified answer | 11 Replies | 3 Followers

Not Ranked
36 Posts
Points 525
cori posted on Mon, Dec 1 2008 9:18 AM

We're getting ready to roll out an upgrade from CS 2.1 to CS 2008.5 SP1 in our production environment.  In testing we've realized that Forum home page urls do not automatically redirect from the 2.1 versions to the 2008.5 versions.  For instance http://www.etcconnect.com/Community/forums/15/ShowForum.aspx does not redirect to http://testserver/Community/forums/15.aspx transparently.  We do notice, however, that forum threads and forum group homepages do redirect transparently (http://www.etcconnect.com/Community/forums/thread/3494.aspx becomes http://testserver/Community/forums/p/1016/3494.aspx#3494 transparently, and http://www.etcconnect.com/Community/forums/default.aspx?GroupID=8 is exactly equivalent to http://testserver/Community/forums/default.aspx?GroupID=8).

Did we miss something in the upgrade, or is there an option to turn on that I've missed?  Barring that, can anyone give me some pointers on how to achieve the same thing?

Thanks in advance!

cori

Answered (Verified) Verified Answer

Top 100 Contributor
206 Posts
Points 3,000
Partners
Verified by cori

Unfortunately, there is a bug in siteurls.config file. You need to find the following line:

<url name="forum_old"  path="{0}/ShowForum.aspx"  pattern="(\d+)/ShowForum.aspx" vanity="{2}?ForumID=$1^UrlName=forum" page="ForumUrlHandler.ashx" />

And replace it with this:

<url name="forum_old"  path="{0}/ShowForum.aspx"  pattern="(\d+)/ShowForum.aspx" vanity="{2}?SectionID=$1^UrlName=forum" page="ForumUrlHandler.ashx" />

I reported the specific bug in the bugs and issues forum. The problem is that the forum url handler component does't look for "ForumID", it looks for "SectionID".

  • | Post Points: 50

All Replies

Top 100 Contributor
206 Posts
Points 3,000
Partners

You should see this line in your siteurls.config file under the 'forums' location:

<url name="post_Old"  path = "{0}/ShowPost.aspx" pattern = "(\d+)/ShowPost.aspx" vanity="{2}?PostID=$1^UrlName=post" page="ForumUrlHandler.ashx" />

The forumurlhandler http handler will take care of the redirect.

Can you find this line?

  • | Post Points: 20
Not Ranked
36 Posts
Points 525
cori replied on Mon, Dec 1 2008 10:41 AM

Sort of - mine looks like this:

<url name="post_Old" location = "forums" path = "{0}/ShowPost.aspx" pattern = "(\d+)/ShowPost.aspx" vanity="ShowThread.aspx?PostID=$1" />

Please correct me if I'm wrong, though, but won't that handle the post/thread redirect?  What I need is to send http://testserver/Community/forums/15/ShowForum.aspx to http://testserver/Community/forums/15.aspx.

  • | Post Points: 20
Top 100 Contributor
206 Posts
Points 3,000
Partners
Suggested by Jeff - ATGi

The difference in your config is significant. But first,

The scenario I think we are talking about is legacy stored links from search engines, etc. being used to access content on the upgraded site. The user clicks a link using "showforum". Is that correct?

If so, then the redirect you want  - to the {postid}.aspx format is handled by the forumurlhander.ashx file which would receive the requests for old style urls. However, with your configuration this file will not get the requests.

  • | Post Points: 20
Not Ranked
36 Posts
Points 525
cori replied on Mon, Dec 1 2008 12:21 PM

Well that is the concern - legacy links from search results and personal bookmarks.

Again though, I'm not at all concerned with specific posts; those seem to work just fine as things stand.  It's the link to the home page of the forum, which used to be at /forums/{ForumID}/ShowForum.aspx and now reside at /forums.{ForumID}.aspx.  That's the redirect that I want to get to....

  • | Post Points: 5
Top 100 Contributor
206 Posts
Points 3,000
Partners
Verified by cori

Unfortunately, there is a bug in siteurls.config file. You need to find the following line:

<url name="forum_old"  path="{0}/ShowForum.aspx"  pattern="(\d+)/ShowForum.aspx" vanity="{2}?ForumID=$1^UrlName=forum" page="ForumUrlHandler.ashx" />

And replace it with this:

<url name="forum_old"  path="{0}/ShowForum.aspx"  pattern="(\d+)/ShowForum.aspx" vanity="{2}?SectionID=$1^UrlName=forum" page="ForumUrlHandler.ashx" />

I reported the specific bug in the bugs and issues forum. The problem is that the forum url handler component does't look for "ForumID", it looks for "SectionID".

  • | Post Points: 50
Not Ranked
36 Posts
Points 525
cori replied on Mon, Dec 1 2008 3:28 PM

I added the code you mention under the Global Paths section and I get exactly the same result, the following error message:

XML Parsing Error: no element found
Location: http://testserver/Community/forums/15/ShowForum.aspx
Line Number 1, Column 1

and no redirect.  Tried it with both SectionID and ForumID, though I'm not sure I understood that bit.

Is there some documentation of the siteurls.config file format(s) that you might point me to?  I couldn't find anything....

  • | Post Points: 20
Not Ranked
36 Posts
Points 525
cori replied on Mon, Dec 1 2008 4:07 PM

Well...as it turns out, I had previously added it to the wrong siteurls.config file (I have a backup directory that I was inadvertently working in).  That said, I looked at the actual siteurls.config file in my actual working directory and there's already a line in there as follows:

<url name="forum_old"  path="{0}/ShowForum.aspx"  pattern="(\d+)/ShowForum.aspx" vanity="{2}?ForumID=$1^UrlName=forum" page="ForumUrlHandler.ashx" />

Unless I'm much mistaken that's exactly what you mentioned, Jeff, and it still doesn't work.

  • | Post Points: 20
Not Ranked
36 Posts
Points 525
cori replied on Mon, Dec 1 2008 4:21 PM

OK, now I am truly confused.

Poking around a little to better understand what's going on under the hood, I commented out the existing forum_old url node and added the following:

<url name="forum_old" path="{0}/ShowForum.aspx"  pattern="(\d+)/ShowForum.aspx" vanity="$1.aspx" />

attempting to mimic the url I get when I browse to the forum through the ui.

Now Community Server 2008.5 attempts to redirect but throws me to a "Page not found error, with the error path as follows:

http://testserver/Community/error-notfound.aspx?aspxerrorpath=/Community/forums/15.aspx

However, the real url for that particular forum if I browse throught the ui is:

http://testserver/Community/forums/15.aspx

So shouldn't my hacked url work?

  • | Post Points: 5
Top 10 Contributor
4,034 Posts
Points 61,125
TelligentSupportTeam

you need to change hte ForumID part to SectionID

<url name="forum_old"  path="{0}/ShowForum.aspx"  pattern="(\d+)/ShowForum.aspx" vanity="{2}?SectionID=$1^UrlName=forum" page="ForumUrlHandler.ashx" />

You will then need to restart your website before changes will take effect.

  • | Post Points: 5
Top 100 Contributor
206 Posts
Points 3,000
Partners

Sorry Cori, what I pasted in is the exact existing entry. You have to edit it slightly and change ForumID to SectionID in the vanity - that's the important part.

  • | Post Points: 20
Not Ranked
36 Posts
Points 525
cori replied on Mon, Dec 1 2008 5:03 PM

OK, now this makes sense - at least in terms of what I have to do, and it has the added benefit of actually working Big Smile  I still don't really understand the workings, or why SectionID works but not ForumID, but those're probably implementation details that I don't really need to understand.

Jeff, if you wouldn't mind updating your post above to clarify replacing the ForumID with SectionID (I know it's in there, but I didn't get it out of what you wrote) I would be overjoyed to mark that as the answer to my problem....

Thanks for the help. folks!

  • | Post Points: 5
Page 1 of 1 (12 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com