Re: Can i have url like domain/username

2007-11-02 Thread James

Hey Yujin,

I do something similar.

 'faqs',
'action' => ':action'));

// This line is a catch all
Router::connect('/*', array('controller' => 'pages', 'action' =>
'display'));

?>

Check out this article.
http://bakery.cakephp.org/articles/view/custom-urls-from-the-site-root

Hope this helps.

james


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Can i have url like domain/username

2007-11-01 Thread dardosordi

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 cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Can i have url like domain/username

2007-11-01 Thread dardosordi

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/paramis a 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 cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Can i have url like domain/username

2007-11-01 Thread Zoltan

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 cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Can i have url like domain/username

2007-11-01 Thread Frank

No i don't think that's possible. How should Cake know if 'rogers' in
http://domain/rogers/param is a 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/USERNAMEtothe 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- 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 cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Can i have url like domain/username

2007-11-01 Thread Adwin Wijaya

What about
http://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/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 cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Can i have url like domain/username

2007-10-31 Thread Claudia

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 Urls http://domain/USERNAME to 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 cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Can i have url like domain/username

2007-10-31 Thread MrTufty

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 cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Can i have url like domain/username

2007-10-31 Thread HostOnNet.com

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, like http://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 cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---