Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix issue with /posts

This used to cause a silly infinite redirect. Now it doesn't. Woo.
  • Loading branch information...
commit 4f0ff76afb50fc3203e1872848a466701b3fc005 1 parent 9d7ee0a
@steveklabnik authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 blog.rb
View
6 blog.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.