That makes sense.
My application will also be using the same database and folders.
I've been experimenting a little and have come up with a solution
that's working fairly well, but just needs a little tweaking. I
actually didn't need to use .htaccess at all, but used routes to route
all requests that do not have a subdomain to a controller that will
parse the url and figure out via variables stored in the database,
which controller should handle the request, and then I use
requestAction() to grab the content. I think it will work well.

In routes.php:

$subdomain = substr($_SERVER['HTTP_HOST'],
0,strpos($_SERVER['HTTP_HOST'],'.') );
if (!defined('DISPATCH_ROUTE'))
{
        define ('DISPATCH_ROUTE',
'userpages/display/'.$subdomain.'/'.$from_url);
        $from_url = DISPATCH_ROUTE;
}

Then I handle the routing in userpages_controller.php, display()
function.

function display($subdomain, $page_name, $action='index', $id=null)
{
    // Grab page type based on the $page_name, and match with
appropriate controller
}


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

Reply via email to