bingo: redirect /en/ to /en, follow the view links
/en/ answered 200 with the same page as /en. The canonical tag covered it, but a 301 keeps crawlers and shared links on a single URL. The All / Operational toggle links were rel="nofollow". The filtered page is already noindex with a canonical back to the locale URL, so nofollow on our own links only threw away internal link signals. Assisted-by: Claude:opus-5
This commit is contained in:
parent
dc799d6d47
commit
d2d6ac1d99
3 changed files with 15 additions and 2 deletions
|
|
@ -97,7 +97,13 @@ class BingoWeb < Sinatra::Base
|
|||
erb :sitemap, layout: false
|
||||
end
|
||||
|
||||
get %r{/(ru|en|uk)/?} do |locale|
|
||||
# One URL per page: /en/ is a duplicate of /en.
|
||||
get %r{/(ru|en|uk)/} do |locale|
|
||||
qs = request.query_string
|
||||
redirect "/#{locale}#{"?#{qs}" unless qs.empty?}", 301
|
||||
end
|
||||
|
||||
get %r{/(ru|en|uk)} do |locale|
|
||||
@locale = locale
|
||||
@view = Bingo::VIEWS.include?(params[:view]) ? params[:view] : 'all'
|
||||
@board = Bingo::Board.load(@view)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue