n2cms/n2cms — pull request #28 by jamestharpe (2011-10-28 21:12:15+00:00)
Title: Consistent URL Enforcement

Please see http://n2cms.codeplex.com/discussions/277160 - this builds the discussed functionality directly into N2.

ContentItem.cs - Added SafeParent property to fall-back to a previous version's parent of the current version's parent is not available.

RequestLifeCycleHandler.cs - Added code to compare requested URL with the "preferred" URL and permanently redirect to the preferred URL if the requested URL does not match. Added utility functions necessary to achieve this; they should probably be moved but I am not familiar enough w/ the source to put them in the appropriate areas; sorry :(.

Url.cs - Now forces all URLs that do NOT have an extension (e.g. ".aspx") to end in a slash for sake of consistency.