Thursday, January 7, 2010

Re: Routing techniques

i would not recommand that
usually http://my.website.com/user/[username]/ or http://my.website.com/profile/[username]/
is the better approach

the main problem with your url is that you might get conflicts with
other routes
example:
a user registers with "images"

if you have a controller "images"
you would have the images on http://my.website.com/images
even if you add /profile etc it is at least still confusing

you should be able to accomplish that with custom routes, though
there might be more on that matter in the cookbook


On 7 Jan., 14:19, rahulb <bhojra...@gmail.com> wrote:
> Hello,
>           I want to know whether , there is any way by which I can
> change the routing mechanism of cakephp.
> For example,
>   If i want to change my routing mechanism in such a way that i can
> manipulate urls like these :
>      http://my.website.com/[username]/profile
> Where the [username] will be the name of the user and every new user
> who registers with my site , should be able to access his profile in
> the manner given above.
>
> Is there a way by which this can be achieved.

No comments: