Skip to content
This repository has been archived by the owner on Jul 22, 2018. It is now read-only.

itspriddle/host_router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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' }

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages