summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-05-30 20:07:16 +0200
committerMichał Górny <mgorny@gentoo.org>2018-05-30 20:07:16 +0200
commitee3547e0b01d940f9d5839fa7abf2043bddf88cc (patch)
treedada4e16351d47e718c6923f369b2469a850cf4c
parentTry to use 301 (permanent) redirects for address rewrites (diff)
downloadfrontend-ee3547e0b01d940f9d5839fa7abf2043bddf88cc.tar.gz
frontend-ee3547e0b01d940f9d5839fa7abf2043bddf88cc.tar.bz2
frontend-ee3547e0b01d940f9d5839fa7abf2043bddf88cc.zip
Try splitting redirects for threads/messages
-rw-r--r--ag-web.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/ag-web.rb b/ag-web.rb
index 5ef3522..a37c2ec 100644
--- a/ag-web.rb
+++ b/ag-web.rb
@@ -101,7 +101,11 @@ get '/:list/' do
end
end
-get '/:list/(threads|messages)/?' do
+get '/:list/threads/?' do
+ redirect '/%s/' % [params[:list]], 301
+end
+
+get '/:list/messages/?' do
redirect '/%s/' % [params[:list]], 301
end