From 706cc69ca7ae83e38e636956d68788126a95ff0f Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 22 Nov 2012 13:53:48 +0100 Subject: [PATCH] [webui] return moved_permanently for package/files --- src/webui/app/controllers/package_controller.rb | 5 +++++ src/webui/config/routes.rb | 1 + 2 files changed, 6 insertions(+) diff --git a/src/webui/app/controllers/package_controller.rb b/src/webui/app/controllers/package_controller.rb index 8f15e289213..9e40ad9f839 100644 --- a/src/webui/app/controllers/package_controller.rb +++ b/src/webui/app/controllers/package_controller.rb @@ -54,6 +54,11 @@ def show #BsRequest.list({:states => 'new', :roles => "target", :project => @project.name, :package => @package.name}) end + def files + # we need to keep this as long as it's in google's index + redirect_to url_for(action: :show, package: params[:package], project: params[:project]), :status => :moved_permanently + end + def set_linking_packages if @spider_bot @linking_packages = [] and return diff --git a/src/webui/config/routes.rb b/src/webui/config/routes.rb index e70992f0bbb..3fc24562a35 100644 --- a/src/webui/config/routes.rb +++ b/src/webui/config/routes.rb @@ -117,6 +117,7 @@ match 'package/repositories' => :repositories match 'package/change_flag' => :change_flag match 'package/import_spec' => :import_spec + match "package/files" => :files end controller :patchinfo do