ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Changed title, new url, redirect old

January 12, 2009 12:02pm

Subscribe [2]
  • #1 / Jan 12, 2009 12:02pm

    Helmi

    23 posts

    Hi,

    how does EE handle changed URLs? Let’s say a posts title changes from “Hello” to “good bye” - according to the title also the URL changes. Is it possible to have the old URL redirect (Status 301 would be the best) to the new one?

    Any default behaviour on this or something that can be done with a plugin?

    Thanks!
    Frank

  • #2 / Jan 12, 2009 12:20pm

    Lisa Wess

    20502 posts

    The URL title will stay the same unless you either update it yourself or blank it out.  You can change the title without affecting the URL title.

    There is no built-in redirect from old URL titles to new.

  • #3 / Jan 12, 2009 2:02pm

    Helmi

    23 posts

    Thanks, Lisa but that’s a too bad. Do you know of any 3rd-Party Addon that does the redirection job?

  • #4 / Jan 12, 2009 2:03pm

    Lisa Wess

    20502 posts

    I am not aware of a particular add-on for this, no.  Others may have seen one around.

  • #5 / Jan 12, 2009 2:08pm

    Helmi

    23 posts

    ok thanks. Would it probably be possible by building URLs containing a post-id or something and let EE choose the post based on the ID instead of the url-title - even in case of 404-errors?

    That’s a solution i already found on other cms around.

  • #6 / Jan 12, 2009 2:27pm

    Lisa Wess

    20502 posts

    Yes, you can use Entry IDs instead of URL titles.  Look at the permalink and entry_id_path type variables in the list of weblog entries variables.

    I’m going to move this down to How To while we explore possibilities.

  • #7 / Jan 12, 2009 2:31pm

    Helmi

    23 posts

    Ok sounds good but i’d basically not use entry IDs instead of URL titles but in combination, like domain.com/this-is-my-post-title-23560 or something like that. Probably that’s also possible. I’m gonna dive into that a bit more and have a look in the user guides.

  • #8 / Jan 12, 2009 2:32pm

    Lisa Wess

    20502 posts

    You can pass them as different segments, you’ll want the ID in segment 3 as the permanent identifier.  But I’m still not understanding, since this would be the same problem if you changed the URL title.

  • #9 / Jan 12, 2009 2:37pm

    Helmi

    23 posts

    Ok, probably i have to explain a bit more what the target is.

    Imagine there’s a site using domain.com/this-is-my-post-234456 as url format. This url format is built from entry title and entry ID. Now if the title of the entry changes, the URL should also change but the old one should 301-redirect to the new one. Just displayling the same content on the old AND new url would probably lead to problems with google (duplicate content) but the URL should definitely change so a 301 redirect is the only logical solution,

    I hope that’s understandable. So after pulling the correct content out of the database using entry ID the solution would be to redirect to the current URL title that has to be fetched from the database. I don’t know if that’s the expression engine way to do it (i’m still rather new to EE so please bear with me) but that would be the most logical way to do it.

  • #10 / Jan 12, 2009 2:42pm

    Lisa Wess

    20502 posts

    I’m really not following.  You could just permanently use entry IDs; or just keep the URL title the same.  URL titles aren’t really meant to change constantly.  That’s why they’re separate from the title.

  • #11 / Jan 12, 2009 3:10pm

    grrramps

    2219 posts

    What you’re trying to do sounds really interesting, and there are probably other users who may have a similar need, particularly if importing content with different URLs into EE.

    However, basic URLs are not usually intended to be changed frequently, if at all, and for a bunch of reasons (search engines hate those changes, servers take on extra load to account for them, plus, the manual effort required to change and then add redirects in .htaccess.

    EE makes it very easy to change the title of an entry without changing the URL (though changing that is easy enough, too), but there’s no automated way to create a redirect for an entry with a changed URL. It’s “just software” so it could be done, but seems like one of those efforts that promises diminished returns.

    Why do you need to change URLs so frequently?

  • #12 / Jan 12, 2009 3:27pm

    Helmi

    23 posts

    Hi Ronnie,

    thanks for jumping in and thanks for your tipps and hints. Be sure i know about the SEO related pros and cons (yes there are pros! 😊 ) about changing the url to a post. Therefore let me tell you those changes are definitely intended to happen and the behaviour i outlined before is something like a must-have.

    Another useful situation to have such a redirect could be when you have mistyped the title of a blog post but don’t want to have it mistyped in the URL title forever. Therefore it would be nice to change it and make the old one to still work.

    I know of two plugins - one for wordpress, the other for drupal that do things like that and they do it quite well. I’m running both on rather high traffic installations without any big impact so i guess performance shouldn’t be a reason to not have this feature. A clean 301 redirect of changes in URLs is alwas a good solution - for users and search engines.

  • #13 / Jan 12, 2009 3:37pm

    grrramps

    2219 posts

    No problem, Helmi. I’ve been managing many dozens of sites for a dozen years and can count on one hand the number of 301 redirects I’ve needed to create.

    I wonder how many other EE users have had similar issues? If there’s a WP or Drupal plugin to help create the 301 redirects in .htaccess then there’s a need somewhere, right?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases