Stefan Goßner

Senior Escalation Engineer for SharePoint (WSS, SPS, MOSS, SP2010) and MCMS

Blogs

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

  • Comments 4
  • Likes

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:

Comments
  • 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

  • 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

  • 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.

  • Hi Dave,

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

    Cheers,
    Stefan

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Raw Html Fix