Sorry, I mean:
Router::connect('/:username/:controller/:action');
On Nov 1, 4:42 pm, dardosordi <[EMAIL PROTECTED]> wrote:
> I haven't tried it, but:
>
> Router::connect('/:username/:controller/:action', array('controller'
> => 'users'));
>
> On Nov 1, 11:54 am, Frank <[EMAIL PROTECTED]> wrote:
>
> > No i don't think that's possible. How should Cake know if 'rogers'
> > inhttp://domain/rogers/paramisa controller or a username?
>
> > On 1 nov, 09:00, Adwin Wijaya <[EMAIL PROTECTED]> wrote:
>
> > > What abouthttp://domain/username/controller/parameter...
> > > and it also able to do this as well :
>
> > >http://domain/controller/parameters
>
> > > can we do this ?
> > > and how to setup the routes (in 1.2)
>
> > > adwin
> > > wysmedia.com
>
> > > On Nov 1, 3:05 am, Claudia <[EMAIL PROTECTED]> wrote:
>
> > > > You can set up a custom route like this (Cake 1.2 alpha):
>
> > > > Router::connect('/:username', array('controller' => 'users', 'action'
> > > > => 'showUserPage'));
>
> > > > This will connect all Urlshttp://domain/USERNAMEtothecontroller
> > > > users and the action showUserPage.
> > > > The username part of the url is then available via $this-
>
> > > > >params['username'].
>
> > > > Please note that this serves as kind of catchall - no matter what you
> > > > specify in the url, it will be routed to your users controller. So if
> > > > you need other controllers, you need to specify the route to these
> > > > controllers before this route but as mentioned before in this case you
> > > > can't have users with the same name as these controllers.
>
> > > > Claudia
>
> > > > On Oct 31, 6:27 pm, MrTufty <[EMAIL PROTECTED]> wrote:
>
> > > > > All things are possible with CakePHP. Well, almost - it won't make
> > > > > your dinner for you or anything.
>
> > > > > You need to look into custom routes, which you can set up in /app/
> > > > > config/routes.php - that's about as much as I can tell you, because
> > > > > I'm not 100% experienced with that aspect of Cake myself yet. But as
> > > > > far as I can see, this would be very much possible.
>
> > > > > One thing you should be aware of though - if you set up the routing
> > > > > for this, you should also block users from having names which would
> > > > > conflict with your controllers. Otherwise, you're going to run into
> > > > > some rather nasty issues.
>
> > > > > Good luck!
>
> > > > > On Oct 31, 11:25 am, "HostOnNet.com" <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi,
>
> > > > > > I have a web site that have user url like
>
> > > > > >http://domain/USERNAME
>
> > > > > > I know Cake PHP can handle url like
>
> > > > > >http://domain/controller/USERNAME
>
> > > > > > I want with out a controller name, likehttp://domain/USERNAME
>
> > > > > > Is this possible with Cake PHP ?
>
> > > > > > Thanks,
>
> > > > > > Yujin- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > > - Tekst uit oorspronkelijk bericht weergeven -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---