hardscrabble 🍫

Psst. Check out my RubyConf 2017 talk, There are no rules in Ruby.

reroute

09 Jun 2013

I don’t know how you’re supposed to redirect from old sites to new ones but I did it with a simple Sinatra app. I disconnected the previous sinatra app from my domain and connected this and it kinda works!

require 'sinatra'

get '/' do
  redirect "http://maxjacobson.github.io"
end

get '/feed' do
  redirect "http://maxjacobson.github.io/atom.xml"
end

get '/~about' do
  redirect "http://maxjacobson.github.io/blog/about"
end

get '/~projects' do
  redirect "http://maxjacobson.github.io/blog/about"
end

get '/:anything' do
  redirect "http://maxjacobson.github.io"
end

edit November 2014: I open sourced the app and made a few small tweaks to reflect my current internet home.