diff options
author | 2018-05-30 20:04:09 +0200 | |
---|---|---|
committer | 2018-05-30 20:04:09 +0200 | |
commit | f0c27b4629255863e1cccda653c2d1db20e95659 (patch) | |
tree | 35994b3f187d7e9c37b697c46233e7ea57cc4631 | |
parent | Remove the awful redirect on no messages in month (diff) | |
download | frontend-f0c27b4629255863e1cccda653c2d1db20e95659.tar.gz frontend-f0c27b4629255863e1cccda653c2d1db20e95659.tar.bz2 frontend-f0c27b4629255863e1cccda653c2d1db20e95659.zip |
Try to use 301 (permanent) redirects for address rewrites
-rw-r--r-- | ag-web.rb | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -102,15 +102,15 @@ get '/:list/' do end get '/:list/(threads|messages)/?' do - redirect '/%s/' % [params[:list]] + redirect '/%s/' % [params[:list]], 301 end get '/:list/threads/:year-:month' do - redirect '/%s/threads/%s-%s/' % [params[:list], params[:year], params[:month]] + redirect '/%s/threads/%s-%s/' % [params[:list], params[:year], params[:month]], 301 end get '/:list/threads/:year-:month/:page/' do - redirect '/%s/threads/%s-%s/%s' % [params[:list], params[:year], params[:month], params[:page]] + redirect '/%s/threads/%s-%s/%s' % [params[:list], params[:year], params[:month], params[:page]], 301 end get '/:list/threads/:year-:month/:page?' do @@ -143,11 +143,11 @@ get '/:list/threads/:year-:month/:page?' do end get '/:list/messages/:year-:month' do - redirect '/%s/messages/%s-%s/' % [params[:list], params[:year], params[:month]] + redirect '/%s/messages/%s-%s/' % [params[:list], params[:year], params[:month]], 301 end get '/:list/messages/:year-:month/:page/' do - redirect '/%s/messages/%s-%s/%s' % [params[:list], params[:year], params[:month], params[:page]] + redirect '/%s/messages/%s-%s/%s' % [params[:list], params[:year], params[:month], params[:page]], 301 end get '/:list/messages/:year-:month/:page?' do @@ -173,7 +173,7 @@ get '/:list/messages/:year-:month/:page?' do end get '/:list/message/:msgid/' do - redirect '/%s/message/%s' % [params[:list], params[:msgid]] + redirect '/%s/message/%s' % [params[:list], params[:msgid]], 301 end get '/:list/message/:msgid' do |