On 5/18/07, BoSc <[EMAIL PROTECTED]> wrote: > > > A bit of a cryptical description, but here goes. > > Suppose I use a Cake app. to show the content of different cities, > Normally I would use a city controller dat accepts some parameters > like: domain.com/citys/show/newyork (to show city 1) > > What I would like is to use a subdomain to indicate which city to > show: > > newyork.domain.com/city/show (to show city new york) > > I've already read some options of wildcard DNS and stuff like that. > That is all clear to me, except the fact, how to transform the > subdomain into a parameter for a certain page. Also it's important > that the address bar always shows city.domain.com
Apache's rewrite stuff together with a regular expression and a wildcard DNS entry (*.domain.com IN A www.domain.com or similar) should be able to fix that. Sorry I can't give you an example (as I don't have one handy), but it should be a matter of just grabbing the first portion of the domain and sending it to the right controller, and so on. When you manage to get it done, it would be interesting to see how you did it. Cheers Gonzalo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
