Tag Archives: URL

Redirect with customizable redirect headers

The aliases provided by Sitecore provide the same basic functionality, but they will not get you very far if you want to be a bit more advanced and allow the administrators to select the type of redirect or expand the redirect functionality in some other way.

The solution is to create your own redirect functionality which is quite easily achieved by adding some templates and adding a pipeline to the httpRequestBegin processors. Continue reading Redirect with customizable redirect headers

Replace white space in media URLs in Sitecore

When the users create media items and media folders in Sitecore that contain white space all media URLs will also contain white spaces. This is apparently frowned upon by W3C and their html-validator.

One would think that the normal <encodeNameReplacements> in web.config also handles media URLs, but it does not. It is however realtively simple to override the GetMediaUrl(…) that Sitecore uses without being too intrusive. Continue reading Replace white space in media URLs in Sitecore