On Jul 26, 2006, at 3:31 AM, Neil Bradley wrote:> Apologies for the rather lame Subject title. I''m developing a new
CMS
> and want to be able to allow people who sign up to create their own
> user
> account as follows: http://USERNAME.domainname.co.uk
You''ll need a wildcard DNS in order to direct all those new names to
your webserver; i.e. *.domainname.co.uk -> www.domainname.co.uk.
The front-end webserver will need to accept by wildcard too; if you''re
using Apache you can do this with a similar directive; ServerName
*.domainname.co.uk
Then your controllers need to look at the HTTP request that has been
made to work out which USERNAME is coming in, perhaps in request_uri
... perhaps a before_filter to extract the name and present it in an
instance variable?
-jim