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.

Rewrite help (Closed) (Mono Support )

Viewed 8784 time(s), 5 post(s) 12/29/2011 2:00:22 PMby rule128
rule128

rule128

12/29/2011 2:00:22 PM
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
This content has not been rated yet. 
265 Reputation 29 Total posts
denis

denis

12/29/2011 2:39:17 PM
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"/>
This content has not been rated yet. 
7207 Reputation 956 Total posts
rule128

rule128

12/29/2011 4:57:06 PM
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
This content has not been rated yet. 
265 Reputation 29 Total posts
denis

denis

12/29/2011 5:13:54 PM
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).
This content has not been rated yet. 
7207 Reputation 956 Total posts
rule128

rule128

12/30/2011 9:58:54 AM
Thanks this works great
This content has not been rated yet. 
265 Reputation 29 Total posts