It is *possible*, however it may mess things up later, and you'll have to
hard code every other existing path.
Please Note: I'm not sure that this is the BEST way to do this. It is
certainly one way.
In app/config/routes.php, route all your actions like so:
$Route->connect('/articles/edit/*', array('controller' => 'articles',
'action' => 'edit'));
$Route->connect('/articles/add/*', array('controller' => 'articles',
'action' => 'add'));
$Route->connect('/articles/delete/*', array('controller' => 'articles',
'action' => 'delete'));
Then, at the *very bottom*, put the following:
$Route->connect('/:username/', array('controller' => 'users', 'action' =>
'view'));
In your controller, you can access the username with $this->params.
Again, maybe there is a simpler way to do this with routing, any other input
would be welcome.
HTH,
Eric
On 2/1/07, cbmeeks <[EMAIL PROTECTED]> wrote:
>
>
> I would like to do the following.
>
> I have a site with members and right now, they would access their
> profile like:
>
> http://www.example.com/users/view/bob
>
> I would like for "Bob" to access his site like:
>
> http://www.example.com/bob
>
> Is this possible?
>
> Thanks!
>
> http://www.codershangout.com
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---