|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
I'm sure this is a very common situation. I am hoping to get some feedback as to the best way to handle this. When our new site rolls later this month, our domain URL will remain the same as the old static site, but most of the old URLs will be broken. We don't want to leave folks stranded who may try to land on pages from search engines, old bookmarks, etc. So as we create new content in our new umbraco site, we are creating a list of new URL mappings. The question is, what is the best way to handle this? Ideally, we'd like the user to be redirected with a http 301 code. Will the URL Rewriting.net module do this? Also, there will likely be hundreds of these and it looks like each one will have to be added to a config file for urlrewriting. I don't mind doing that, but I'm wondering what kind of performance hit this will be. Is there a better / more efficient way of handling this? Ideas?
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,758 Location: KY, USA
|
I'm thinking a custom not-found handler (see Per's book in the documentation section of the umbraco site) that does a lookup of the appropriate page and sends a 301. Then you can keep all your lookups in one place. If there's no appropriate page to send them to, treat it as a legitimate 404. cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Thanks for the tip, Doug. That's basically what we were doing on our old site. I'll take a look at Per's book. I did discover that it is easy to send a 301 with the URLRewiter module by using redirectMode="Permanent". However, it really looks like the module is better suited to more generic URL rewriting tasks than what I have in mind. Having to update a config file and have the app reset every time is scary...
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
I decided to use the built in "search for alias" for now, since time is an issue, and leave building a custom handler for later. I think this will work for the short term. But I can't get it to work for some reason. Following Per's instructions, I added a "umbracoUrlAlias" property to the doc type, then edited the content node and added the bad URL. But when I request it, I get the 404 page. Is there something I need to do to my config file to enable this handler? Also -- I have a custom 404 page, for which I specified the node id in the errors section of umbracoSettings.config. Would that conflict with the search for alias handler?
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Figured it out. Per's instructions are incorrect. The leading slash needs to go away. In other words, oldpage not /oldpage.
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Okay, I have it working for URLs that do not include a file extension. But it does not work for something like oldpage.htm or oldpage.asp. Seems I remember seeing something somewhere about a setting that will fix this but I can't seem to find it. Any ideas?
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
I hate to do this but I'm asking again because I'm desperate! Anyone know how to get the "search for alias" not found hendler to work with URLs that have a doc extension?
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
Rank: Devotee
Joined: 7/22/2006 Posts: 69 Location: Heraklion Crete
|
Pete, I've managed to find my old post for the solution I've made for 301 redirects. See http://forum.umbraco.org/yaf_postst1922_Custom-301--302-redirect-handler-for-SEO-purpose.aspxIf you are interested for my latest changes and 3.0.5 support, tommorrow I will find some time to send you the files. I've successfuly used it for .htm and .php files. However I never tried .doc files. Google changes urls after 3 or 4 days to the new urls. A complete website with 1500 old urls, took 1 month for google to replace them with the new ones.
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Yes! Please send me the updated files as I am running 3.0.5. Please email me at pgk(at)archland.com. Thank you very much!
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Aficionado
Joined: 3/30/2008 Posts: 114 Location: Sweden
|
I would also like to take a look at the 3.0.5 files, please email me at fredrikhimself(at)hotmail.com
Thanks
|
|
Rank: Devotee
Joined: 7/22/2006 Posts: 69 Location: Heraklion Crete
|
Done
|
|
 Rank: Aficionado
Joined: 3/30/2008 Posts: 114 Location: Sweden
|
Great, thanks!
|
|
Rank: Enthusiast
Joined: 10/9/2008 Posts: 26 Location: London
|
Hi Hohios,
Can I get a copy of the file too please for v3.0.5 - thanks
email: mizansyed[[@]]gmail.com
I am only trying
|
|
|
Guest |