Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 39 lines (24 sloc) 0.659 kb
2c0065a @mattt Initial import
mattt authored
1 # rack-subdomain
2
3 Rack middleware to transparently route requests with a subdomain to a specified path with substitutions.
4
5 ## Usage
6
7 ### Gemfile
8
9 ``` ruby
10 gem 'rack-subdomain'
11 ```
12
13 ### config.ru
14
15 ``` ruby
16
17 # Simple Example
18
19 use Rack::Subdomain, "example.com", to: "/users/:subdomain"
20
21 # Complex Example
22 use Rack::Subdomain, "example.com", except: ['', 'www', 'secure'] do
23 map 'downloads', to: "/downloads/:subdomain"
24 map '*', to: "/users/:subdomain"
25 end
26 ```
27
28 ## Contact
29
30 Mattt Thompson
31
32 - http://github.com/mattt
33 - http://twitter.com/mattt
34 - m@mattt.me
35
36 ## License
37
38 rack-subdomain is available under the MIT license. See the LICENSE file for more info.
Something went wrong with that request. Please try again.