Hi,

you can read more about using the new hostname routing on Ben's blog:
http://www.dasprids.de/blog/2008/07/19/zend-framework-gets-hostname-routing

Best regards
Tobias

2008/7/19 Robin Skoglund <[EMAIL PROTECTED]>:

> On Sat, Jul 19, 2008 at 4:05 PM, Lars Strojny <[EMAIL PROTECTED]> wrote:
>
>> Hi Jose,
>>
>> Am Samstag, den 19.07.2008, 10:50 -0300 schrieb José de Menezes Soares
>> Neto:
>> >
>> > I would like to create a script with ZF that:
>> >
>> > 1. Access www.username.site.com
>> > 2. Prints username profile
>> >
>> > I think I need to create an controller USER with action profile (
>> > http://www.site.com/user/profile/username), and, somehow link it to
>> > www.username.site.com by .htaccess...
>> >
>> > But I don´t know how... any suggestions?
>>
>> You could write your own router resolving $user.host.com to your user
>> controller. In your index.php there would be something like this:
>>
>> <?php
>> if (!$is_maindomain) {
>>    $front->setRouter(new My_Custom_Router());
>> }
>>
>> Or you extend the current router and handle both cases in the router
>> itself.
>>
>> cu, Lars
>>
>
> Actually, I think this something that is now supported natively in the new
> class Zend_Controller_Router_Route_Abstract that will be in 1.6-RC1 on
> monday (currently it's in the standard trunk). I haven't looked at it much
> yet, so I'm not exactly sure how to use it, but you should be able to figure
> it out by looking at the source. Hopefully someone will chime in on this
> with details.
>
> Robin
>

Reply via email to