Skip to content

Instantly share code, notes, and snippets.

View dimitrisdovinos's full-sized avatar

Dimitris dimitrisdovinos

View GitHub Profile
@JonCrawford
JonCrawford / gist:44415
Created January 7, 2009 20:45 — forked from anonymous/gist:44410
Improved! A slight alteratiion of DHH's dynamic subdomain technique.
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
class ApplicationController < ActionController::Base