Subdomains as Controllers

2006-07-11 Thread Quad4

Hi.

I have next standard app structure:
http://domain.com/controller1/action/
http://domain.com/controller2/action/
http://domain.com/controller3/action/

How I can do next trick with Cake?
http://controller1.domain.com/action/
http://controller2.com/action/
http://controller3.com/

Thanx a lot.


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



Re: Subdomains as Controllers

2006-07-11 Thread joe

would that have something to do with the routes?

http://manual.cakephp.org/chapter/4


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



Re: Subdomains as Controllers

2006-07-11 Thread Darian Anthony Patrick

This looks like a job for Apache's mod_rewrite to me. There is a good tutorial 
at http://httpd.apache.org in the documentation section for your (target) 
version of Apache. This info, combined with the app/webroot/.htaccess that 
ships with CakePHP, should get you going.

Good luck,

Darian
--
Darian Anthony Patrick [EMAIL PROTECTED]
-Original Message-
From: Quad4 [EMAIL PROTECTED]
Date: Tuesday, Jul 11, 2006 10:28 am
Subject: Subdomains as Controllers

Hi.

I have next standard app structure:
http://domain.com/controller1/action/
http://domain.com/controller2/action/
http://domain.com/controller3/action/

How I can do next trick with Cake?
http://controller1.domain.com/action/
http://controller2.com/action/
http://controller3.com/

Thanx a lot.






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



Re: Subdomains as Controllers

2006-07-11 Thread Quad4


Darian Anthony Patrick писал(а):
 This looks like a job for Apache's mod_rewrite to me. There is a good 
 tutorial at http://httpd.apache.org in the documentation section for your 
 (target) version of Apache. This info, combined with the 
 app/webroot/.htaccess that ships with CakePHP, should get you going.

Looks good, but...

The  wishful address is http://controller1.domain.com/info/;. With
rule
RewriteRule ^(.*)$ http://domain.com/controller1/$1 [QSA,L]
it rewrites to http://domain.com/controller1/info/; and users can see
that in it's browsers. Not good.
How can I keep wishful address?

P.S. Please, forgive me my bad english...


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



Re: Subdomains as Controllers

2006-07-11 Thread RosSoft

Quad4: in routes.php you can touch directly the $from_url variable. if
all the subdomain requests can see the cakephp installation dir, the in
routes.php you can modify that variable to /controllerX/what_ever_you
want. In $_SERVER and/or env() you have all the information that you
need


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



Re: Subdomains as Controllers

2006-07-11 Thread Quad4

Thank you for you advices, i'll try it tomorrow.


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



Re: Subdomains as Controllers

2006-07-11 Thread Mika

You might also want to look at this thread about wildcard dns'
http://groups.google.com/group/cake-php/browse_thread/thread/8fef8e12c622365f/#


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