简体   繁体   中英

Map a domain to subdomain from rails application

I have a rails application where clients can create their own environment.

For example a client gets his own environment at a subdomain: client.domain.com

But I want them to be able to map their own domain to the subdomain from my domain

How do I do this?

Thank you!

You need to create an association table between an arbitrary hostname and the customer so that you can convert between one and the other. This could either be a stand-alone table, or a field on the customer record.

It's pretty straight-forward to load this instead of using the subdomain method. Just be sure to pre-populate the field with the existing names you're using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM