Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Rails plugin to handle conditional routing based on hostname (or port)

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 rails
Octocat-spinner-32 README.md
Octocat-spinner-32 init.rb
README.md

Host Router

Rails plugin to create routes based on HTTP_HOST (or HTTP_PORT).

Installation

./script/plugin install git://github.com/itspriddle/host_router.git

Usage

# Only available for http://abc.example.com/some/path
map.connect '/some/path',
  :controller => 'somecontroller',
  :conditions => { :host => 'abc.example.com' }

# Available for any site routing to your app, on port 1234
map.connect '/some/path',
  :controller => 'othercontroller',
  :conditions => { :port => '1234' }
Something went wrong with that request. Please try again.