Mono Support Rewrite help (Closed)

Viewed 16550 time(s), 5 post(s), 12/29/2011 2:00:22 PM - by rule128
12/29/2011 2:00:22 PM
265 Reputation 29 Total posts

Hello

I need to remove the "monox" string from all the urls. Ex:

"http://localhost/MonoX/Pages/SocialNetworking/Groups.aspx" I would like to transform it to
"http://localhost/SomeNewName/Pages/SocialNetworking/Groups.aspx"

How can I do this?

Regards

1
12/29/2011 2:39:17 PM
7207 Reputation 956 Total posts

That particular URL is not rewritten, and points to the actual path in the file system. You could add your own rule in the UrlRewritter section of the web.config file. Following your example, it could look like this

<rewrite url="^(.*)/SomeNewName/Pages/Groups.aspx$" to="$1/MonoX/Pages/SocialNetworking/Groups.aspx" name="MyGroups" urlPattern="/SomeNewName/Pages/Groups.aspx"/>

2
12/29/2011 4:57:06 PM
265 Reputation 29 Total posts

Hello Denis

Thanks for the response. It works fine.
I have one more problem now.
If I use the links from the generated menu I get links like:
"http://localhost/MonoX/Pages/SocialNetworking/Groups.aspx"
how can I chnage them to:
"http://localhost/SomeNewName/Pages/SocialNetworking/Groups.aspx"

Regards

3
12/29/2011 5:13:54 PM
7207 Reputation 956 Total posts

Rewritten URLs cannot be picked up automatically by the navigation menu. The easiest way to accomplish this would be to go to the Page admin section of the admin backend, remove the existing navigation link from the left pane (right click on it and choose delete, it will remove only the menu item, and not the actual page), and than enter a new item - right click on the left pane, choose "New external page", enter the name and the URL (/SomeNewName/Pages/SocialNetworking/Groups.aspx).

4
12/30/2011 9:58:54 AM
265 Reputation 29 Total posts

Thanks this works great

5
This is a demo site for MonoX. Please visit Mono Software for more info.