Forum: Radiant CMS pre 404

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
329bfa71096934d3a0c530f59577eb22?d=identicon&s=25 Todd McGrath (Guest)
on 2007-03-27 14:25
(Received via mailing list)
Hi,

I wasn't sure what to call this post - here goes...

I'm migrating from an existing site catalog to Radiant based site.  The
site is
indexed in various search engines already, so after deploying the new
Radiant
based site, it is very likely a search engine result will produce a link
to an
old site URL.  I'd like to devise a way to accommodate the old URL in
the new
site.

This is what I'm thinking: reviewing the site logs I've created a table
of old
url and new Radiant url.  Now, I need to write some code that checks the
url
for a reference in the aforementioned table _before_ returning a 404.
My
assumption is that the old url will not be found in Radiant based site,
so the
FileNotFoundPage will be called.  (I want to check the URL before
processing
FileNotFoundPage and if found in the table, redirect to the new URL, of
course).

So, where is the best place to integrate this code into Mental?

app/models/FileNotFoundPage and override render method?

I see in Page:
children.find(:first, :conditions => "class_name = 'FileNotFoundPage'")

So, I guess the FileNotFoundPage is hardcoded.

Could I write an extension to drop in a custom FileNotFoundPage?

Your thoughts appreciated,

Todd
767bedcbd5dd54d874a602925d98182e?d=identicon&s=25 Oliver Baltzer (Guest)
on 2007-03-27 14:33
(Received via mailing list)
Hi Todd:

Todd McGrath wrote:
> So, where is the best place to integrate this code into Mental?

Why don't you use normal HTTP redirects with status code 301. You can
easily set those up with mod_rewrite in Apache and it even allows you to
 have an external program to generate the redirect URLs. Lighttpd might
be able to do similar. That way also the search engines will be notified
of the change of URL and can link their entries for both URLs together.

Cheers,
Oliver
22ff4abebc9bfd299524bb14449d95dc?d=identicon&s=25 Erik van Oosten (Guest)
on 2007-03-27 14:38
(Received via mailing list)
Todd,

There was a thread on this subject a couple of weeks ago.
http://www.nabble.com/forum/ViewPost.jtp?post=9445...

Regards,
     Erik.


Todd McGrath schreef:
> This is what I'm thinking: reviewing the site logs I've created a table of old
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/
329bfa71096934d3a0c530f59577eb22?d=identicon&s=25 Todd McGrath (Guest)
on 2007-03-27 16:18
(Received via mailing list)
Thanks Erik and Oliver

Quoting Erik van Oosten <e.vanoosten@chello.nl>:
This topic is locked and can not be replied to.