Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 16
- Log:
Configured for temporary /rails/typo location on Alpha. Updated
several layouts for RISC OS Open Limited site style. Now produces
proper "Not found" page in redirect_controller.rb. Updates to
database schema from Typo SVN (small change in the way tables are
defined, but same tables end up being defined). Set location of
SendMail in vendor/rails/actionmailer/lib/action_mailer/base.rb.
- Author:
- adh
- Date:
- Sun Jul 23 10:51:56 +0100 2006
- Size:
- 664 Bytes
1 | class RedirectController < ContentController |
2 | def redirect |
3 | r = Redirect.find_by_from_path(params[:from]) |
4 | |
5 | if(r) |
6 | # From http://pinds.com/articles/2005/11/06/rails-how-to-do-a-301-redirect, thanks |
7 | headers["Status"] = "301 Moved Permanently" |
8 | path = r.to_path |
9 | url_root = request.relative_url_root |
10 | path = url_root + path unless url_root.nil? or path[0,url_root.length] == url_root |
11 | redirect_to path |
12 | else |
13 | render :text => '<html><head><title>Page not |
14 | found</title></head><body>Internal redirection error - page not |
15 | found.<br>Please consult the system adminstrator.</body></html>', |
16 | :status => 404 |
17 | end |
18 | end |
19 | end |