Perhaps related to this, I've been trying to set up something like:

www.mydomain.com/article_name

as a default, if no other controllers match, it would do a regexp
check (something like /[a-z0-9_]{5,30}/ ) and then pass that through
to  www.mydomain.com/articles/view/article_name

Zoltan
www.yyztech.ca

On Oct 31, 4:05 pm, 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/USERNAMEto the controller
> 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


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to