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.

Url rewrite from monox to custom  (Mono Support )

Viewed 26176 time(s), 4 post(s) 8/1/2013 10:56:59 AMby mev9669

Related topics

mev9669

mev9669

8/1/2013 10:56:59 AM
Hi 

i have developed a custom project, I have added the discussion link in my header. The link is ....com/MonoX/Pages/SocialNetworking/Discussion.aspx. I want to remove monox from all the links. How can i do this? Also I feel this should be a standard feature, all the reference to monox folders should be using a rewrite rule.

Thanks
This content has not been rated yet. 
515 Reputation 67 Total posts
mzilic

mzilic

8/1/2013 11:59:54 AM
Hello,

Please refer this topic for information about the following: http://www.mono-software.com/Mono/Pages/Discussion/dtopic/s64GG08g4UihQZ_4AC9rug/Removing-MonoX-Pages-from-the-URL/?dbmpageno=1

Regards,
Mario
This content has not been rated yet. 
2218 Reputation 300 Total posts
mev9669

mev9669

8/7/2013 9:19:32 AM
Hi Mario,

With the limited knowledge I have about url rewrite, I tried to use the following rules for the discussion module

<rewrite url="^(.*)/SN/(.*)?$" to="$1/MonoX/Pages/SocialNetworking/$2" name="SN" urlPattern="/SN/{PageName}" />

<rewrite url="^(.*)/dboard/(.*)/(.*)/(\?(.+))?$" to="$1/MonoX/Pages/SocialNetworking/Discussion.aspx?boardId=$2&$5" name="Discussion" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx"urlPattern="/dboard/{BoardId}/{Slug}/" />

None of these woorked for me. And its giving me errors. I need all the below rules re written to remove refrences of MonoX in the path


  <!-- discussion board -->
      <rewrite url="^(.*)/dboard/(.*)/(.*)/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?boardId=$3&amp;$5=$6&amp;$8" name="DiscussionPaged" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/dboard/{BoardId}/{Slug}/" />
      <rewrite url="^(.*)/dboard/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?boardId=$3&amp;$6" name="Discussion" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/dboard/{BoardId}/{Slug}/" />
      <rewrite url="^(.*)/dtopic/(.*)/(.*)/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?topicId=$3&amp;$5=$6&amp;$8" name="DiscussionTopicPaged" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/dtopic/{TopicId}/{Slug}/" />
      <rewrite url="^(.*)/dtopic/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?topicId=$3&amp;$6" name="DiscussionTopic" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/dtopic/{TopicId}/{Slug}/" />
      <rewrite url="^(.*)/(.*)/dfilter/(.*)/(.*)/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?tftype=$3&amp;$5=$6&amp;$8" name="DiscussionTopicFilterPaged" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dfilter/{FilterType}/{Slug}/" />
      <rewrite url="^(.*)/(.*)/dfilter/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?tftype=$3&amp;$6" name="DiscussionTopicFilter" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dfilter/{FilterType}/{Slug}/" />
      <rewrite url="^(.*)/(.*)/dfilter-tag/(.*)/(.*)/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?tftype=$3&amp;dbtTag=$4&amp;$5=$6&amp;$8" name="DiscussionTopicTagFilterPaged" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dfilter-tag/{FilterType}/{Slug}/" />
      <rewrite url="^(.*)/(.*)/dfilter-tag/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?tftype=$3&amp;dbtTag=$4&amp;$6" name="DiscussionTopicTagFilter" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dfilter-tag/{FilterType}/{Slug}/" />
      <rewrite url="^(.*)/(.*)/dmessage/(.*)/(.*)/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?dmsgId=$3&amp;dmsgMode=$4&amp;$5=$6&amp;$8" name="DiscussionEditMessagePaged" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dmessage/{MessageId}/{Mode}/" />
      <rewrite url="^(.*)/(.*)/dmessage/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?dmsgId=$3&amp;dmsgMode=$4&amp;$6" name="DiscussionEditMessage" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dmessage/{MessageId}/{Mode}/" />


Secondly when I add the discussion page to top menu, it also puts a link as ../MonoX/... How can monox reference be removed from this url?
This content has not been rated yet. 
515 Reputation 67 Total posts
khorvat

khorvat

8/7/2013 1:14:19 PM
Hi,

the easiest way to do this is to move the discussion page out of that location to let's say root folder or any place convenient for you and then change the rules:

From:
 
<!-- discussion board -->
      <rewrite url="^(.*)/dboard/(.*)/(.*)/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?boardId=$3&$5=$6&$8" name="DiscussionPaged" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/dboard/{BoardId}/{Slug}/" />
 
To:
 
<!-- discussion board -->
      <rewrite url="^(.*)/dboard/(.*)/(.*)/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?boardId=$3&$5=$6&$8" name="DiscussionPaged" defaultPage="/YourFolder/Discussion.aspx" urlPattern="/dboard/{BoardId}/{Slug}/" />

Just add the external url and put in the rewritten path to your discussion page
Secondly when I add the discussion page to top menu, it also puts a link as ../MonoX/... How can monox reference be removed from this url?
e.g. http://www.mono-software.com/support/mono/

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