unpublish items where i've changed their location in location scheme

We wanted a way to allow one of our users to create short url’s (i.e. www.cica.ca/cpd). He creates roughly 3-4 of these a month for our magazine which directs people to specific articles or pages on the web site. So I’ve setup a check (Redirect Yes/No) and a Redirect Name for him to fill out when creating the item. In my location scheme for this content type it check to see if Redirect=Yes and then creates a folder with the redirect name under the root of the site and then gives the file name default.aspx. This works great.

The issue is that when we try to unpublish this item its trying to find the item at the location that is setup in Rhythmyx instead of the new location. So my question is is there a way to setup a location scheme for unpublish or setup some kind of filter or something??

Why did we do this? The articles in Rhythmyx are creating in folder such as ‘Archives/2008/November/’. Unless someone has a different way we can approach this entirely.


One of the approaches we have used at other customers is to create a
“Redirect” item that points to an article. The article itself publishes in the normal place (/Articles/2008/November/xxx) and the redirect is published in the root directory as a “friendly URL”.

Depending on which web server you use, you can either publish these redirects as simple HTML files with a “content refresh” header, or include them as redirect statements in the .htaccess file.

You have the added burden of managing the extra item, but you also do not have to remove the item when the redirect is no longer needed.


Ok that would work. How did you setup the redirect content item? What is the user inputting?? If you wouldn’t mind sharing how you setup the content item, that would great.


Dave: is the “redirect” item a separate content item, a non cms managed file or perhaps an additional (publish always) template for the content type with a location scheme that publishes into the root?

I had in mind a separate content item where the user enters the “friendly” URL and then adds the original item to a slot.

Since most articles don’t need these redirects (only 3 or 4 per month, and I assume that there are more than articles than that) it does not make sense to require this data on every article.

The exact setup depends on which kind of redirect you are using.

I gave your suggestion a try but I’m having some difficulty figuring this out.

I’ve created my redirect content type and I’ve created a new slot.

I then added the code below to my page template

<script runat=“server” type=“text/C#”>
private void Page_Load(object sender, System.EventArgs e)
Response.Status = “301 Moved Permanently”;
Response.AddHeader(“Location”,“link goes here”);

Basically this script will redirect the page using asp.net. Now the issue I’m having is if I put the slot node in the “link goes here” the Active Assembly won’t show it; I’ve also tried using just the Callout field and thought well maybe the user could do a inline link but of course that inserts the <a href> tag which is no good either. So I’m at a loss for this … Its almost like I need to do a slot outside the above script and then have a binding that takes the value of the slot …

Anyway thoughts on this anyone?