On Mar 16, 2011, at 13:57, hoss7 wrote:

> can you explain more about that config and how can cakephp menage
> this?
> if i want create more subdomain how can i tell apache and cakephp to
> menage all subdomain
> note:i dont create subdomain,cakephp create subdomain for my user,how
> can i tell apache and cake to menage this?

Ah, you didn't say that before.

If you want any number of subdomains to direct to CakePHP, then you'll use:

<VirtualHost *:80>
        ServerName domain.com
        ServerAlias *.domain.com
        DocumentRoot /path/to/cakephp/app/webroot
        # other directives here, possibly copied from your
        # cakephp .htaccess
</VirtualHost>

Now any request for any hostname under domain.com will go to your CakePHP app 
(provided, of course, you've already configured your DNS to have this wildcard 
mapping). How you from there determine what hostname was used, and make choices 
in your app based on it, is something I'll leave to you, or to others to answer 
in more detail. You could simply examine $_SERVER['HTTP_HOST'], or somebody has 
probably written a CakePHP plugin or component or behavior or something that 
attempts to encapsulate the feature.




-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to