There are two different reasons for ugly URL’s on in presentation mode:
- when using Webauthor and switching to live site
- when doing a postback in on a form to send data to the server.
The following articles discuss different ways to address this:
There are two different reasons for ugly URL’s on in presentation mode:
The following articles discuss different ways to address this:
Permalink
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
Permalink
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
Permalink
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.
Permalink
Hi Dave,
I haven’t used this property.
It might be related to the fact that MCMS does not support smart navigation.
Cheers,
Stefan