Pre 404

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

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

Thanks Erik and Oliver

Quoting Erik van Oosten [email protected]:

Todd,

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

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: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant


Erik van Oosten