Skip to content

Commit

Permalink
[webui] return moved_permanently for package/files
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Nov 22, 2012
1 parent 0ddb6ea commit 706cc69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/webui/app/controllers/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/webui/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 706cc69

Please sign in to comment.