circket, thank you for the replay.

actually i set to 'id'=>'[0-9a-zA-Z]+' in the beginning but make it
simple since nothing was working for me.


code below gives me a "Missing controller error" it say I don't have a
Hp Controller
=================================================
Router::connect('/hp/:id/', array(
             'controller' => 'users',
                 'action' => 'homepage',
                 ), array(
                        'id'=>'[0-9a-zA-Z]', 'pass'=>'id'
        ));
=================================================

then if i have this code then it bring  to home page
=================================================
Router::connect('/hp/:id/', array(
             'controller' => 'users',
                 'action' => 'homepage',
                 ), array(
                        'id'=>'[0-9a-zA-Z]+', 'pass'=>'id'
        ));
=================================================

What am I missing?




On Jan 25, 5:08 pm, cricket <zijn.digi...@gmail.com> wrote:
> What does the error msg say? That UsersController is missing, or
> something else?
>
> Are your usernames limited to lowercase letters only and no digits?
>
> And you might want to pass the ID to your action:
>
> Router::connect(
>     '/hp/:id/',
>     array('controller' => 'users', 'action' => 'homepage'),
>     array('id'=>'[a-z]', 'pass' => 'id')
> );
>
> On Jan 25, 5:19 pm, leafchild <leafchild.b...@gmail.com> wrote:
>
>
>
> > I'm tring to fix URL
>
> >www.mysite.com/users/homepage/{user's login name}
> > ->www.mysite.com/{user's login name}
>
> > but I couldn't figure it out so I'm tesing with this 
> > firstwww.mysite.com/users/homepage/{user's login name}
> > ->www.mysite.com/hp/{user's login name}
>
> > Router::connect('/hp/:id/', array( 'controller' => 'users',  'action'
> > => 'homepage', ),
> >                               array('id'=>'[a-z]',  )
> >                        );
>
> > then when I access, mysite.com/hp/{user's login name}, I'm getting a
> > missing controller error.
>
> > What I'm I doing wrong? I was expected to see the page with this URL.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to