Welcome to TechNet Blogs Sign in | Join | Help

MCMS tip of the day - how to avoid ugly URLs in MCMS

There are two different reasons for ugly URL's on in presentation mode:

  1. when using Webauthor and switching to live site
  2. when doing a postback in on a form to send data to the server.

The following articles discuss different ways to address this:

Published Wednesday, May 11, 2005 1:22 PM by Stefan_Gossner
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Friday, July 22, 2005 2:30 AM by Christian

# re: MCMS tip of the day - how to avoid ugly URLs in MCMS

Hi Stefan,

We have a (large) customer that does not like the ugly URLs that are associated with resource gallery items.

Are you aware of a similar solution for resource gallery items?

Thanks,
Christian
Friday, July 22, 2005 3:23 AM by Stefan_Gossner

# re: MCMS tip of the day - how to avoid ugly URLs in MCMS

Hi Christian,

that would mean a lot of effort.
You need to implement an ISAPI filter that rewrites the nice URL to the Ugly one to allow MCMS to understand it.
In addition you need to replace the standard webauthor dialog to insert the resource into the posting with the nice one.
Or alternatively you need a HttpModule that replaces the link in the output stream with the nice one.

Cheers,
Stefan
Sunday, April 16, 2006 3:09 AM by Dave

# re: MCMS tip of the day - how to avoid ugly URLs in MCMS

Hi Stefan,

I've implemented your HttpModule solution to the ugly URL problem (outlined in http://blogs.technet.com/stefan_gossner/archive/2004/04/23/118623.aspx). It's implemented on an ASP.NET 2.0 website and it works great!

However, if I add the following attribute to the Page directive on any of the ASPX pages:

MaintainScrollPositionOnPostBack="true"

Then any of the pages that include this attribute report a Javascript error during page load. The error is:

Error: Webform_SaveScrollPositionSubmit is undefined.

If I remove either your HttpModule, or the MaintainScrollPositionOnPostBack attribute then the pages work again.

Have you come across this? Or, do you have any ideas what might be causing the clash?

Thanks & regards,

Dave.
Tuesday, April 18, 2006 7:46 AM by Stefan_Gossner

# re: MCMS tip of the day - how to avoid ugly URLs in MCMS

Hi Dave,

I haven't used this property.
It might be related to the fact that MCMS does not support smart navigation.

Cheers,
Stefan

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker