Beathaven::Application.routes.draw do get "main/index" root :to => "main#index", :as => "main" match 'artist(/:name)' => 'artist#view' match 'listen/:id' => 'track#listen' match 'search/autocomplete' => 'artist#autocomplete' match 'reg/:email/:code' => 'user#register', :constraints => { :email => /[-a-z0-9\._@]+/i, :code => /[a-z0-9]{8}/ } match '*a', :to => 'errors#routing' end