MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Group Page URL Rewrite   (Mono Support )

Viewed 11323 time(s), 7 post(s) 1/22/2013 4:00:17 AMby sam0864

Related topics

sam0864

sam0864

1/22/2013 4:00:17 AM
I have few groups and created custom page for each group. For example, I have Web Design group. Using groups.aspx code, I customized it for Web Design group and named it as WebDesignGroup.aspx. I want to update the URL for this group to be (http://localhost/WebDesign)
I used this code
<rewrite url="^(.*)/Webdesign/(.*)?$" to="$1/MonoX/Pages/SocialNetworking/WebDesignGroup/GroupView/ogTE0Fmv1E6yrZ2lAYWbkg/Web-design/$2" name="WebDesign" defaultPage="/MonoX/Pages/SocialNetworking/WebDesignGroup/GroupView/ogTE0Fmv1E6yrZ2lAYWbkg/Webdesign/" urlPattern="/Webdesign/{PageName}" />

but the problem I lose the custom URL once the user navigate to the group discussion board and topics

I want to continue use and keep the same URL logic for any inherited links
for example the URL should look like - if possible -

http://localhost/WebDesign/
http://localhost/WebDesign/Discussion/***
http://localhost/WebDesign/Topics/****

I don't want to go back to URL like this one
http://localhost/MonoX/Pages/SocialNetworking/Groups/dboard/djwRhTGJa0y3rZ2lAYXIXw/Web-design/?GroupId=ogTE0Fmv1E6yrZ2lAYWbkg&iwm=DiscussionBoard
or
http://localhost/MonoX/Pages/SocialNetworking/Groups/dtopic/7ML63pf5W02M_qE4AZtvww/Testing-Web-Design-Group-Discussion-Board/?GroupId=ogTE0Fmv1E6yrZ2lAYWbkg&iwm=DiscussionBoard

Assuming I know the group ID



This content has not been rated yet. 
656 Reputation 79 Total posts
Zoomicon

Zoomicon

1/22/2013 7:30:35 AM

maybe if you moved those pages to the top folder instead?

btw, apart from url rewrite on mozilla, chrome (not ie) one can use javascript history api I think to change address bar

This content has not been rated yet. 
2793 Reputation 345 Total posts
sam0864

sam0864

1/22/2013 5:14:55 PM
Does it make a difference?

My issue is with updating Discussion boards/topics group internal URLs to be look like
http://localhost/WebDesign/Discussion/***
http://localhost/WebDesign/Topics/****

This content has not been rated yet. 
656 Reputation 79 Total posts
sam0864

sam0864

1/23/2013 8:43:35 PM
Any tips/suggestion??
This content has not been rated yet. 
656 Reputation 79 Total posts
kpeulic

kpeulic

1/24/2013 1:56:06 PM
Our suggestion is to don't change the root of the Groups URL, because it is very complex functionality and if you change that you can provide a lot of problems. 

Can you tell us what you trying to do? Maybe we can help you with other suggestions.
This content has not been rated yet. 
1849 Reputation 181 Total posts
sam0864

sam0864

1/25/2013 6:11:59 AM
Assume, I have three main groups (group1, group2, and group3). I created the three group and want to customize each group page. I customized groups.aspx code for each group and renamed to customgroup1.aspx, customgroup2.aspx,..

Since I know group ID of each group, I want to organize and simplify the URL to access each group
Something like
http://localhost/group1/
or
http://localhost/mygroups/group1

I was able to update the rewrite parameters to access the group with simple URL. I need help in updating the internal group links (such as photos, discussion boards, topics,..) and continue using the same URL pattern
for example
http://localhost/mygroups/group1/discussiion/*/*/*
and
http://localhost/mygroups/group1/topics/*/*/





This content has not been rated yet. 
656 Reputation 79 Total posts
khorvat

khorvat

1/25/2013 8:41:01 AM
Hi Sam.

Group WebPart is very complex control that uses by default three large sections (Wall notes, Discussion boards & Photo galleries), every section for it self has a few rewriting rules that are built to manage rewriting in stand alone scenario and in group scenario. In order to point everything to your main groups you will have to change the following rules:

<!-- social networking general -->
<rewrite url="^(.*)/RequestConfirmation/(.*)/(.*)/(\?(.+))?$" to="$1/MonoX/Pages/MonoX/Confirmation.aspx?RequestType=$2&RequestId=$3&$5" name="RequestConfirmation" urlPattern="/RequestConfirmation/{RequestType}/{RequestId}/" />
<!-- Photo Gallery -->     
<rewrite url="^(.*)/(.*)/activeview/(.*)/albumview/(.*)/(\?(.+))?$" to="$1/$2.aspx?AlbumId=$4&activeview=$3&$6" name="PhotoList" defaultPage="/MonoX/Pages/SocialNetworking/PhotoGallery.aspx" urlPattern="/{PageName}/{ActiveControlAction}/{ActiveControlValue}/{AlbumView}/{AlbumId}/" />
<rewrite url="^(.*)/(.*)/activeview/(.*)/photoview/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?FileId=$4&AlbumId=$5&activeview=$3&$7" name="PhotoView" defaultPage="/MonoX/Pages/SocialNetworking/PhotoGallery.aspx" urlPattern="/{PageName}/{ActiveControlAction}/{ActiveControlValue}/{PhotoView}/{PhotoId}/{AlbumId}/" />
  <!-- discussion board -->
  <rewrite url="^(.*)/(.*)/dboard/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?boardId=$3&$6" name="Discussion" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dboard/{BoardId}/{Slug}/" />
  <rewrite url="^(.*)/(.*)/dtopic/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?topicId=$3&$6" name="DiscussionTopic" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dtopic/{TopicId}/{Slug}/" />
<rewrite url="^(.*)/(.*)/dfilter/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?tftype=$3&$6" name="DiscussionTopicFilter" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dfilter/{FilterType}/{Slug}/" />
<rewrite url="^(.*)/(.*)/dfilter-tag/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?tftype=$3&dbtTag=$4&$6" name="DiscussionTopicTagFilter" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dfilter-tag/{FilterType}/{Slug}/" />
  <rewrite url="^(.*)/(.*)/dmessage/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?dmsgId=$3&dmsgMode=$4&$6" name="DiscussionEditMessage" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dmessage/{MessageId}/{Mode}/" />
and maybe these, if you want to enable direct group editing on your main groups:

<!-- dynamic group rules, can be used regardeless of the actual name of the page that holds group parts -->
<rewrite url="^(.*)/(.*)/GroupView/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?GroupId=$3&$6" name="GroupView" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupView/{ShortId}/{Slug}/" />
<rewrite url="^(.*)/(.*)/GroupEdit/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?GroupId=$3&EditMode=true&$6" name="GroupEdit" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupEdit/{ShortId}/{Slug}/" />
<rewrite url="^(.*)/(.*)/GroupList/(\?(.+))?$" to="$1/$2.aspx$3" name="GroupList" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupList/" />
<rewrite url="^(.*)/(.*)/GroupInsert/(\?(.+))?$" to="$1/$2.aspx?InsertMode=true&$4" name="GroupInsert" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupInsert/"/>
<rewrite url="^(.*)/(.*)/GroupSearch/(.*)/(\?(.+))?$" to="$1/$2.aspx?SearchValue=$3&$5" name="GroupSearch" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupSearch/{SearchValue}/" />
<rewrite url="^(.*)/(.*)/GroupSearch/(\?(.+))?$" to="$1/$2.aspx?ShowAllGroups=true&$4" name="GroupSearchShowAll" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupSearch/" />
<rewrite url="^(.*)/(.*)/GroupCategory/(.*)/(\?(.+))?$" to="$1/$2.aspx?Category=$3&$5" name="GroupCategory" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupCategory/{CategorySlug}/" />
NOTE: If you change these rules to point to your main groups you will lose the rewriting functionality for other groups and those WebPart in stand alone usage. 

I'd suggest you to another approach as this one will require a lot of effort and you will lose some functionality, why don't you go with changing the group rewriting to point to some "static page" and then on that page you handle the custom styling and WebPart for that specific group ?

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts