Aigarius schrieb: > Hello all, > > I am writing a complex web site in TG2 and am wondering about how to > best realise on of our design goals. > > Let's assume that we have the main site on http://www.example.com and > we want our users to be able to do actions on different types of > objects. While we could use URL such as > http://www.example.com/cars/Toyota/diesel/2003/ > and have the root controller contain a line such as: > > cars = CarController() > > We would like to be able to use URLs like > http://cars.example.com/Toyota/diesel/2003/ > and have that be handled by a separate controller within the same TG2 > application. I could not find a reference to such way of doing things > in the documentation and got too lost in the source to figure it out > myself. > > Could someone please point me to a proper way of doing such a thing?
I think you *should* be able to faciliate mod_rewrite/mod_proxy of the apache for this. Create a vhost for both domains, and let the latter use mod_rewrite and mod_proxy to internally rewrite the query in the way you described above. This would of course open up a cars-namespace unde www.example.com, but that shouldn't be to bad. Alternatively, you could create two applications that share their codebase, as Chris explained. Diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

