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 17154 time(s), 5 post(s) 29.12.2011 14:00:22by rule128
rule128

rule128

29.12.2011 14:00:22
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
Dieser Inhalt wurde noch nicht bewertet. 
265 Reputation 29 Total posts
denis

denis

29.12.2011 14:39:17
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"/>
Dieser Inhalt wurde noch nicht bewertet. 
7207 Reputation 956 Total posts
rule128

rule128

29.12.2011 16:57:06
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
Dieser Inhalt wurde noch nicht bewertet. 
265 Reputation 29 Total posts
denis

denis

29.12.2011 17:13:54
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).
Dieser Inhalt wurde noch nicht bewertet. 
7207 Reputation 956 Total posts
rule128

rule128

30.12.2011 09:58:54
Thanks this works great
Dieser Inhalt wurde noch nicht bewertet. 
265 Reputation 29 Total posts