Permalink
Browse files

Fix issue with /posts

This used to cause a silly infinite redirect. Now it doesn't. Woo.
  • Loading branch information...
steveklabnik committed Feb 24, 2013
1 parent 9d7ee0a commit 4f0ff76afb50fc3203e1872848a466701b3fc005
Showing with 5 additions and 1 deletion.
  1. +5 −1 blog.rb
View
@@ -65,6 +65,10 @@ def format_outline(outline)
rss.to_s
end
+ get "/posts/?" do
+ redirect "/archive"
+ end
+
get '/posts/:id' do
begin
source = SourceFile.new(params[:id])
@@ -88,7 +92,7 @@ def format_outline(outline)
#lol octopress
get '/*' do
post = params[:splat].first.gsub("/", "-").gsub(".html", "")
- pass if post.nil?
+
redirect "posts/" + post, 301
end
end

0 comments on commit 4f0ff76

Please sign in to comment.